0

I have followed this link to post on friends wall in facebook :

Here is my code :

    FBRequest *request = [FBRequest requestWithGraphPath:@"FRIEND_ID/feed" parameters:[NSMutableDictionary dictionaryWithObject:@"Post on wall" forKey:@"message"] HTTPMethod:@"POST"];

[request startWithCompletionHandler:^(FBRequestConnection *connection,id result, NSError *error){
    NSLog(@" result : %@",result);

}];

I have following permissions from the user :

(
    "create_note",
    "basic_info",
    "share_item",
    "status_update",
    "user_photos",
    "publish_actions",
    "user_friends",
    "publish_checkins",
    "video_upload",
    "publish_stream",
    "photo_upload",
    installed,
    email,
    "public_profile",
    "user_birthday",
    "user_location",
    "friends_birthday",
    "friends_photos"
)

but getting error message as follow :

Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xa52d700 {com.facebook.sdk:HTTPStatusCode=403, com.facebook.sdk:ParsedJSONResponseKey={
    body =     {
        error =         {
            code = 200;
            message = "(#200) Feed story publishing to other users is disabled for this application";
            type = OAuthException;
        };
    };
    code = 403;
}

please let me know where am I mistaking ?

Community
  • 1
  • 1
Dhaval H. Nena
  • 3,992
  • 1
  • 37
  • 50

2 Answers2

0

The ability to post to user users wall via the Graph API was removed on 2013/2/6, see answer and reference here:

Posting to friends' wall with Graph API via 'feed' connection failing since Feb 6th 2013

Check the IOS Feed Dialog example: https://developers.facebook.com/docs/ios/ui-controls#feeddialog

Community
  • 1
  • 1
Tobi
  • 31,405
  • 8
  • 58
  • 90
0

Facebook actually removed the ability to post on friend's wall via Graph API a few months ago. This changes took effect on Feb 6th.

You can read it here: https://developers.facebook.com/roadmap/completed-changes

Removing ability to post to friends walls via Graph API We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail. If you want to allow people to post to their friends' timelines, invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag). For more info, see this blog post.