I want to use the Facebook Graph API in a NATIVE iPhone application. Can anyone find a way to post images / messages on a user's feed?
I have tried all possible ways to post a 'photo' (not a URL but a UIImage) on the feed and is now working on it for 2 weeks.
If you go to facebook.com, you can upload a photo from your computer to the wall. I am using ASIHTPPRA IEEEEEET to work on the Facebook Graph API.
This is the closest I have gone to post a picture on the feed. So if I have a ASIFormDataRequest * request = [ASIFormDataRequest requestWithURL: url];
url
To post a picture now I do the following:
[Request set post value: @ "My message "For: @" message "]; [Request setPostValue: @ "somepic.png" for: @ "picture"]; [Request setPostValue: @ "for some names": @ "name"]; [Request setPostValue: @ "Some Details" forKey: @ "description]; [request startAsynchronous];
If you try it on everything works fine except for posting The empty placeholder is still showing on the feed for the image.
I want to help It has helped a bit.
Please read the tutorial on setting up the Facebook SDK.
- (zero) UpdateStatsave Th text: (NSString *) fbTitle // Status title and Story URL: (nssting *) fbURL // URL for story and story: (nssting *) fb story // story and image: (nssting *) display imageURL Image and Prompt: (Prompt) Prompt String {NSLog (@ "UpdateStatusWith Text"); NSString * attachmentText = [NSString stringWithFormat: @ "{\" name \ ": \" href \ ": \"% @ \ ", \ ": \" \ ": \" \ "Media \": [{\ "type \": \ "image \", \ "\" src \ ": \"% @ \ ": \" , "" \ "APL Fan \": \ "ARL \": \ " % \ "}," "\" Properties \ ": {\" uploaded from iPhone \ ": {\" text \ ": \" Href \ ": \" your iTunes upstream url \ "}}} ", FB Title, FBRR, FB Story, Imagural, FBRR]; NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: prompt sting, @ "user_message_prompt", // action links, @ "property", attachment text, @ "attachment", zero]; NSLog (@ "attachment text:% @", attachment text); [Facebook Dialogue: @ "Stream. Publish" and Perm: Params and Diegolet: Self]; }
Comments
Post a Comment