Ankit Sachan
Ankit Sachan

Reputation: 7850

iphone:graph api getting FBCDN image is not allowed in stream

I am trying to do achieve this

1) Upload a photo on facebook 2) collect the url of this uploaded picture from response string 2) then create a post and for the picture property using the link of above photo but things are not working it seem

getting "FBCDN image is not allowed in stream" after I try to post the feed.

ASIFormDataRequest *newRequest = [ASIFormDataRequest requestWithURL:url];
[newRequest setPostValue:[comments text] forKey:@"message"];

[newRequest setPostValue:[NSString stringWithFormat:@"%@", [responseJSON objectForKey:@"picture"]] forKey:@"picture"];

[newRequest setPostValue:@"nem appears here??" forKey:@"name"];
[newRequest setPostValue:@"caption appears here??" forKey:@"caption"];
[newRequest setPostValue:@"description appears here??" forKey:@"description"];
[newRequest setPostValue:@"http://google.com" forKey:@"link"];

[newRequest setPostValue:_accessToken forKey:@"access_token"];
[newRequest setDidFinishSelector:@selector(postToWallFinished:)];

[newRequest setDelegate:self];
[newRequest startAsynchronous];

please help me to solve this

Upvotes: 0

Views: 1230

Answers (1)

mahboudz
mahboudz

Reputation: 39376

Instead of sending the URL in with a "picture" tag, send just the ID of the uploaded picture, which was returned to you in the request delegate call, and send that back with a tag of "object_attachment".

Read more here: Attaching Existing Facebook Photos to Wall Posts

Upvotes: 4

Related Questions