开发者

Photo posted via Facebook IOS SDK goes to wrong album

Generally, when we post a photo to Facebook using the Facebook iOS SDK, it automatically goes into a photo album named after the application. For example, if the Facebook application is called "MyApp" then the photo gets saved to the photo album 'MyApp photos'.

However, as of two days ago, an app that we are working on has started behaving oddly, with all the photos posted through it being saved to a 'DifferentApp photos' photo album.

The photo is still associated with the correct app because underneath the caption it still says 'X minutes ago via MyApp' and the MyApp link goes to MyApp. For the life of me, I can't work out how 'DifferentApp' came into the picture.

The code that posts the photo hasn't changed but for what it's worth;

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:img, @"picture",message,@开发者_如何学JAVA"caption",nil];

[appDelegate.fbObj requestWithGraphPath:@"me/photos"andParams:params andHttpMethod:@"POST" andDelegate:self];

What has changed is that we are now forcing the Facebook SDK to authenticate via in-app webview rather than by switching to the Facebook app (see Disable Single Sign On (SSO) in Facebook IOS SDK)

A few other points to consider;

  • If we delete the 'DifferentApp Photos' album and then post a new photo, the photo gets saved in a another album, i.e. 'ThirdApp Photos'
  • We registered a whole new Facebook app and posted photos through that - the photos still go to the wrong album

Any thoughts/ ideas would be greatly appreciated.


Check the photo id which comes in the response after calling me/photos on the graph API and you might notice the same thing I did. And now, for the rest of the story :-)

I ran into the same issue with newly created Facebook apps while apps I created months ago still allowed me to upload pictures to my wall & associated photo album without any issue.

Surly the photo was getting uploaded to Facebook since a valid response was coming back with the photo's id however turns out if I append the newly uploaded photo's id to http://www.facebook.com/photo.php?fbid= the photo would show up but in an album which couldn't be deleted nor was accessible in my list of albums. (The album was named after an iOS app which used Facebook Connect, I made over a year ago)

After more hacking and whacking I decided to log into my iOS app with another Facebook account which hardly has any data. To my surprise I was able to successfully upload a picture to the app's album and see it appear on my wall.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜