简体   繁体   English

照片通过 Facebook IOS SDK 发布到错误的相册

[英]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.通常,当我们使用 Facebook iOS ZF20E3C5E54C0AB3D375D660B3 应用程序将照片发布到 Facebook 时,它会自动进入一个名为 6F68 的相册。 For example, if the Facebook application is called "MyApp" then the photo gets saved to the photo album 'MyApp photos'.例如,如果 Facebook 应用程序名为“MyApp”,则照片将保存到相册“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.然而,截至两天前,我们正在开发的一个应用程序开始出现异常行为,通过它发布的所有照片都保存到“DifferentApp 照片”相册中。

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.该照片仍与正确的应用程序相关联,因为在标题下方仍然显示“X 分钟前通过 MyApp”,并且 MyApp 链接转到 MyApp。 For the life of me, I can't work out how 'DifferentApp' came into the picture.对于我的生活,我无法弄清楚“DifferentApp”是如何出现的。

The code that posts the photo hasn't changed but for what it's worth;发布照片的代码没有改变,但它的价值;

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:img, @"picture",message,@"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 ) 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, ie 'ThirdApp Photos'如果我们删除“DifferentApp Photos”相册然后发布一张新照片,该照片将保存在另一个相册中,即“ThirdApp Photos”
  • We registered a whole new Facebook app and posted photos through that - the photos still go to the wrong album我们注册了一个全新的 Facebook 应用程序并通过它发布照片 - 照片仍然是 go 到错误的相册

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.在图表 API 上调用我/照片后检查响应中出现的照片 ID,您可能会注意到我做的同样的事情。 And now, for the rest of the story:-)现在,对于 rest 的故事:-)

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.我在新创建的 Facebook 应用程序中遇到了同样的问题,而我几个月前创建的应用程序仍然允许我将图片上传到我的墙上和相关的相册而没有任何问题。

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. 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出现但在我的专辑列表中无法删除也无法访问的专辑中。 (The album was named after an iOS app which used Facebook Connect, I made over a year ago) (这张专辑以我一年多前使用 Facebook Connect 的 iOS 应用程序命名)

After more hacking and whacking I decided to log into my iOS app with another Facebook account which hardly has any data.经过更多的黑客攻击后,我决定使用另一个几乎没有任何数据的 Facebook 帐户登录我的 iOS 应用程序。 To my surprise I was able to successfully upload a picture to the app's album and see it appear on my wall.令我惊讶的是,我能够成功地将图片上传到应用程序的相册并看到它出现在我的墙上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM