Publishing links to user's wall using Facebook iOS SDK

前端 未结 2 1295
长情又很酷
长情又很酷 2021-01-03 01:26

I\'m trying to publish a link to the user\'s wall on Facebook after he has already logged in using the new Facebook iOS SDK.

I want the link to behave as if the user

2条回答
  •  忘掉有多难
    2021-01-03 01:53

    You need to use FBStreamDialog for this. I do not have the exact code. Try this:

    FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
    dialog.delegate = self;
    dialog.userMessagePrompt = @"What's in your mind?";
    dialog.attachment = @"{\"name\":\"Apple URL","
    "\"href\":\"http://www.apple.com\","
    "\"caption\":\"App Name\",\"description\":\"Posting link Test\","
    "\"media\":[{\"type\":\"image\","
    "\"src\":\"http://www.apple.com\","
    "\"href\":\"http://www.apple.com\"}],"
    "\"properties\":{\"another link\":{\"text\":\"Apple home page\",\"href\":\"http://www.apple.com\"}}}";
    [dialog show];
    

提交回复
热议问题