开发者

How to post a string and an image using facebook api for ios

i have 开发者_如何学Pythona ui image and a nsstring .How do i post it to the the wall of a user using fb api for ios.


You need to upload an image somewhere, in order to obtain an image url. once you have the url, you can post it something like:

[_facebook requestWithGraphPath:@"feed" 
  andParams:[NSMutableDictionary dictionaryWithObjectsAndKeys: FEED_MESSAGE, @"message", 
        IMAGE_URL, @"picture", 
        LINK, @"link",
        name, @"name",
        description, @"description", nil]
   andHttpMethod:@"POST"
   andDelegate:self];

Note that the "picture" key is the actual url of the image, whereas "link" key is the url opened when an image is clicked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜