开发者

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

开发者 https://www.devze.com 2023-03-20 13:44 出处:网络
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 ha

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

精彩评论

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