Facebook Post Alert - February 2013 Breaking Changes - ruby-on-rails-3

Iam working on a rails application and using FBGraph to post on Facebook. The facebook post happens when a person clicks on a Want button. Iam using the following code to post on a user's wall:
if facebook_post.user.granted_publish_actions?
me = FbGraph::User.me(facebook_post.user.oauth_token)
me.feed!(
:picture => facebook_post.picture_url,
:link => facebook_post.link,
:name => facebook_post.name,
:description =>facebook_post.description
)
end
This code doesn't call Open Graph API to post on a user's wall. But still my app got the alert which is basically a warning for the apps that call Open Graph API to post on user's wall.
Please advice if Iam missing something.
Many thanks.

The alert is sent because your app setting for "February 2013 Breaking Changes" is disabled. If you have nothing to modify, just go to app's Advanced setting page and enable this.
The URL for setting page is something like "https://developers.facebook.com/apps/APP_ID/advanced"

Related

xcode twitter api authorize screen issue

I have an app that I'm using the xcode IDE and writing in Objective-C that uses the twitter api and the 'default' twitter login page for username and password.
I already have all the oauth stuff set up and it is working fine.
I create a new view controller with a web view inside it, and pass the URL of https://api.twitter.com/oauth/authorize.
If I put in my email and password, everything works fine - the view disappears, and we are then off and running.
If I press cancel on the twitter login screen, I get a twitter page saying I need to log in. I need to capture the cancel in my code so I can dismiss the view controller, but I cannot find out what the name of the callback is? I tried didFailLoadWithError but that is not it.
Can someone shed some light on this please?
It turns out it can be handled from the same callback that handles a 'correct' login. except looking for a failure.
So, they have handled it correctly within the original callback.

Facebook App request in iOS (not using Dialog)

I need to send a request throw my app to user's friends in Facebook (After the app on Facebook is authorized) I know there is a way to do it through the SDK :
[self.facebook dialog:#"apprequests" andParams:params andDelegate:nil];
But I don't need that way to show the dialog I just need to be able to send the request in the background when the user select the friend from (Table View for example).
Is this possible?
The Facebook Dialog API has not been updated (yet, hopefully). You can't bypass the dialog the way you want to do it.
But, you can :
preselect the friends with your own GUI and gives the apprequest the selected facebook ids. This way, the dialog is just to confirm the request.
activate the frictionless parameter, to avoid the dialog the next time you send the request for the same selected friends (the confirm dialog seems to show anyway, though, and immediately disappear, it gives a not-so-nice blink on the screen).
here's the related documentation, in case you need it : https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/

Using FBGraph with Rails 3 Problems posting to my own page on facebook

Following on from this post Where do I get an access token from to post to my facebook page using FBGraph gem in Rails 3? I am now able to make posts to my own facebook page but the posts are not visible to anyone other than me
I have all the privileges and I have an off line token. My facebook app settings for my account are set to public for my app.
Using the following code I can make posts, it's just that they are not isible to anyone.
How do I sort this out? Is it some approval process or app setting I have to make or is it down to my code? Totally stumped!
My code
def send_fb_message(params = {})
owner = FbGraph::User.me(FB_TOKEN)
pages = owner.accounts
page = pages.detect do |page|
page.identifier == FB_PAGE_ID
end
page.feed!(
:message => params[:message],
:description => params[:description],
:link => params[:link]
)
end
My FB_TOKEN constant is an offline access token supposedly for the user me, the FB_PAGE_ID constant is the id of the page I wish to post to.
I am using the Rails console to call the above method on my dev machine. Not sure if the location of the request makes a difference?
What am I missing?
Thanks in advance
Do you have the sandbox mode enabled in the advanced app settings?

Sorry, something went wrong after cancel application connexion on SDK 3.0

I'm using the new PHP SDK 3.0 and I use the new getLoginUrl() function with the following parameters.
$paramsLogin = array(
'scope' => PERMISSIONS,
'redirect_uri' => REDIRECT_URI
);
If the user clicks "cancel" on the application permissions popup, I redirect the user on an error page which contains a message explaining that he has to accept the permissions in order to participate to the contest and a new login button.
But when i click on the login button again, facebook displays the following message :
Sorry, something went wrong. We're working on getting this fixed as
soon as we can.
If I wait for a while then click again on the login button It works as expected.
I read somewhere that facebook should be displaying "Leave application" in the permission popup instead of "Cancel" I guess this is the issue.
Anyone has any clue on how to solve that problem or should I submit a bug report on facebook.
This is currently open as a bug in Facebook's bug tracker, see here: https://developers.facebook.com/bugs/287587111265733 - I reproduced it myself earlier, and it's been assigned for fixing
I believe if you wait a while the dialog works again (i.e the failure only happens if you go back to the dialog quickly after rejecting it, which shouldn't really happen except when aggressively testing).

need help to get Facebook profile picture. Also is GRAPH Api online test site down?

I followed the instructions from github.com/facebook/facebook-ios-sdk
and can get Facebook login dialog and get connected. It's for ipad application to get FB info. user name, friend list can be fetched correctly.
I tried to get the profile picture
[_facebook requestWithGraphPath:#"me/picture" andDelegate:self];
and received response:There was a problem communicating with server...
but similar calls like
[_facebook requestWithGraphPath:#"me/posts" andDelegate:self];
[_facebook requestWithGraphPath:#"me/friends" andDelegate:self];
work just fine.
also tried the facebook graph API online test site:
https://developers.facebook.com/tools/explorer/
to use it, first get access token, then tried to get posts, friends, and they are fine.
but when to get picture will take forever, and never return anything.
I did log into my facebook account in a web browser and the profile picture appears just fine.
The Graph API for the user endpoint is described here:
http://developers.facebook.com/docs/reference/api/user/
About the picture connection, it says:
HTTP 302 redirect to URL of the user's profile picture (use ?type=square | small | normal | large to request a different photo).
So what you get is not the typical JSON response, but the picture itself (via the HTTP redirect). You can try that by entering the graph API call into your browser location bar. For example, to see the profile pic of Mark Zuckerberg, try:
http://graph.facebook.com/markzuckerberg/picture