I’m trying to upload photos to a Facebook group from my iPhone app. I have a photo in the resourcedirectory and the FB login command works fine:
facebook.login( fbAppID, fbListener, { “publish_stream” } )
I then try to post the photo and I get two errors.
The code is:
local attachment = {
message = "Photo test from the app",
source = { baseDir=system.ResourceDirectory, filename="proceed.jpg", type="image" }
}
facebook.request( "my\_group\_id/photos", "POST", attachment )
And the errors are:
#260: Modifying existing photos requires the extended permission photo_upload.
and
The operation couldn’t be completed. (facebookErrDomain error 10000)
The latter I believe just means I don’t have correct permissions, which is evident by the former. I have in my facebook.login command the same permission everyone lists of “publish_stream”. My understanding is that it should include “photo_upload”. But I’ve tried swapping those permissions to all kinds of values, including “photo_upload” alone and even empty permissions or completely unrelated permissions, and I keep getting the same two errors every time I rebuild and reload the app to my phone.
I can see that the access token I’m receiving is the same one I’ve been receiving from the start no matter what I change the permissions to. If I go to Facebook’s debug page for Access Tokens I always get this same list of scopes for this token…
create_note photo_upload publish_actions publish_stream share_item status_update video_upload
There’s photo_upload, clear as day.
On the actual Facebook App I’ve added “photo_upload” to the extended permissions there as well. That didn’t help.
The Facebook group itself is marked Secret, but I have permission to post photos and tested with my personal account, the same one I’m logged into on my phone, directly and had no problems.
I tried logging out of Facebook on the phone and logging back in. Still nothing. The interesting thing is that the app never asks me to accept new permissions even if I change them in the app’s code. You briefly see the FB page come up and then it just disappears every time but the first time I added this code.
Is there a way to kill this access token, or would that even help? Any other suggestions would be appreciated. [import]uid: 17341 topic_id: 34649 reply_id: 334649[/import]