I added a new button which posts a sample image using the Graph API
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"api_key", imagePath, @"picture", @"testing", @"message",
nil];
[_facebook requestWithGraphPath:@"USER_ID/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
but was getting the error:
facebookErrDomain error 10000The solution was to add
publish_stream to the list of permissions passed on to the [facebook authorize] method and finally got it to work.NOTE: The image I posted to a friend's wall was from a publicly available link and not some binary data I have on the iOS application. For some reasons (and I find this really strange), Facebook does not allow posting an image from their domain to friend's wall using the Graph API.
I'm having a similar problem...What other permissions did you include?
ReplyDelete@Scott
ReplyDeleteOur iOS application allows the user to post images to his Facebook wall. Currently I only have two permissions set: read_stream and publish_stream.
Hope this helps!
I have this same error ("facebookErrDomain error 10000") when I post wall messages within less than about 10 minutes interval. I cannot find anything about this 10 minutes delay. Is that normal?
ReplyDeleteWe want to post achievements on facebook in an iOS game and in some situation they might happen in less than 10 minutes.
Hi Jules,
ReplyDeleteUnfortunately, I'm not aware of such interval problems. In my case I'm able to post in intervals of less than a minute.
Hope this helps!
This really help, thanks.
ReplyDeleteIt proves there is a problem somewhere. I have yet to find it.
I'm trying to post a message on friend's wall, using requestWithGraphPath and I've requested permissions: @"publish_stream",@"read_stream", @"offline_access" and I'm still getting
ReplyDeletefacebookErrDomain error 10000.
Any ideas? The code for posting is:
NSString* path = [NSString stringWithFormat:@"%d/feed", friendFbId];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"api_key",
@"Please join me...", @"message",
@"http://someurlhere", @"link",
@"http://somepicurlhere.png", @"picture",
@"Join me in...", @"name",
msg, @"description",
nil];
[facebookHandle requestWithGraphPath:path andParams:params andHttpMethod:@"POST" andDelegate:self];
@Mayoneez
ReplyDeleteCan you confirm that the URL that you're using for @"link" param is not from FB's domain? Another problem I had which threw the same error was when using a URL from Facebook (for example uploading an image to FB, getting that image's url and then posting that URL to a friend's wall).
The url in link is not from FB domain. I also tried using just the "message" parameter and left out everything else. Same error.
ReplyDeleteI tested posting on my own wall (with graph path: "me/feed") and the code works. So it seems to be somehow related to permissions but I don't understand what's the problem, since according to documentation publish_stream permission should give me rights to publish to my and my friends' walls.
ReplyDeleteMy bad. The actual reason was in fact the friend ID I was using. I got the id from facebook and converted it to a number and it was most likely over the int range and flipped to another number. I then stored the number as an NSString and passed that in the POST request and it worked. Stupid of me...
ReplyDelete