I am building a demo app where I can upload random jokes generated via the app. My code was working fine before 12th August 2011, updated facebook api. Now Facebook has a policy that you cannot automate the status updates via apps, the user should write the status update ? How do I get a work around for this ?
NSMutableDictionary* params = [NS开发者_如何学JAVAMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"app_id",
MainTextView.text, @"message",
nil];
[_facebook dialog:@"feed" andParams:params andDelegate:self];
This is what I used and use to work perfect . I have also tried stream.publish .
Regards
You need to have publish_stream
to create a post on a user's wall. If you're trying to create a post when the user is not directly logged in to your app, you also need the offline_access
permission.
This blog post details changes made on August 12th. I don't see anything that would have broken your app's ability to post status messages. It's more likely you are really dealing with a permissions issue.
The "policy that you cannot automate the status updates" is more of a guideline. In the documentation for the publish_stream
permission this is what they say (emphasis added):
Please note that Facebook recommends a user-initiated sharing model.
Meaning they recommend against posting automated messages to a user's wall. But they have no way of detecting whether a user initiated the post in your app or not, so they leave it up to you to be a responsible citizen.
It's really simple:
POST to https://graph.facebook.com/user-id/feed the key-value pair "message":"A rabbit walks into a bar..." Your application must have the publish_stream permission.
精彩评论