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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top