2

Is it possible to use the Facebook iOS SDK Share Dialog to share on a Friend's Wall? I know that it is possible to do this using the Feed Dialog, but that provides the user with a less than optimal experience, and seems to be discouraged by Facebook. It would be fantastic if we could configure the Share Dialog to share with one particular friend.

Additionally, is there a way to share with a friend privately (such that it would be sent to Messages)?

I have researched pretty extensively and it seems like there is not a way to do either of these things using the iOS SDK - I would just like to confirm that I am not missing something.

UPDATE:Facebook now offers the Message Dialog for sending links, images and open graph objects to friends through FB Messenger, but the recipient(s) can't be specified ahead of time.

SAHM
  • 4,078
  • 7
  • 41
  • 77
  • I added to the answer about the share dialog and deleted the incomplete answer. If you think the API actually allows to share on friend's walls with the share dialog do you have any reference/code? As far as my research goes it is definitely not possible. Thanks – Fr4ncis Nov 14 '13 at 10:18
  • No, I think you are right, I just wanted the answer to be complete before I accepted it. I did accept it, but I just saw that you took out the part about still being able to publish to other's walls via the feed dialog. I just want to leave a complete and accurate answer for anyone who should look at this question in the future. – SAHM Nov 14 '13 at 13:58

1 Answers1

1

It seems like the ability to post on other people's wall is being removed Feed story publishing to other users is disabled for this application. The SDK itself could potentially allow it

FBRequest *request = [[FBRequest alloc] initWithSession:FBSession.activeSession
                                                  graphPath:@"/**CHANGE_WITH_USER_ID**/feed"
                                                 parameters:params
                                                 HTTPMethod:@"POST"];

But trying I get the following error:

Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x175773d0 {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;
}, ...

As I was saying in the comment, as far as I know private messaging has been removed as well.

The Share Dialog seems to be used only for sharing on your own timeline. The API does not provide options to change the request URL (as in FBRequest). Share Dialog doc

Community
  • 1
  • 1
Fr4ncis
  • 1,387
  • 1
  • 11
  • 23
  • I have a live iOS app, and an app that is in Review, and publishing to Friends' walls via the feed dialog is working in both. Is there any documentation to show that it is being removed?? – SAHM Nov 11 '13 at 19:12
  • if I recall, it took me a long time to get all of the Facebook code right in my app - I think it is very app specific. I would download the Facebook iOS SDK if I were you, they have a bunch of sample code projects, you could figure out which one most closely models how you would like to use Facebook in your app and use that as a model, perhaps taking bits and pieces from different projects. If you want to use the feed dialog specifically here is the link for the guide to setting it up: https://developers.facebook.com/docs/ios/feed-dialog-using-ios-sdk/ – SAHM Nov 12 '13 at 02:29
  • is that what you were asking for or did I misunderstand? – SAHM Nov 12 '13 at 02:31
  • OK, now it's clear you need to use the feed dialog to post on someone else's timeline. – Fr4ncis Nov 12 '13 at 10:34
  • That's right, the Feed Dialog of the iOS SDK DOES still work to publish to the user's friend's walls, though it is a little complicated to setup, it does not look or feel as nice as the Share Dialog, and its use seems to be discouraged by Apple. – SAHM Nov 14 '13 at 14:01
  • Please share some Demo code or App for share message in Selected friends FB Wall. – I'm a Learner Sep 09 '16 at 13:08