Why does this facebook create album code create duplicate albums?

萝らか妹 提交于 2019-12-23 10:06:58

问题


I have this code that works fine (in that it creates the album properly). However, it creates two identical albums. I've tried removing message and privacy (not that this should have changed anything, but still). Nothing I try is changing the fact that this code creates two albums. I've even gone so far as to comment it out to ensure that it was the only code firing and no albums were created. I have code after this to post two test pictures and it only posts the pictures to one of the groups. However, I have an exit after this code, so I've ensured it's the only code firing.

Help, Please!

print "Creating album\n";
try {
    $ret_obj = $facebook->api('/me/albums', 'post', array(
        'access_code' => $access_code,
        'name' => 'Coolest Album',
        'message' => 'Coolest Album containing bike stuff',
        'privacy' => array('value'=>'EVERYONE'),
        ));
} catch (Exception $e) {
print_r($e->getMessage());
}
print "Album created\n";`

回答1:


What version of php are using? And, what is the version of the Facebook API? If you use Facebook 2.0, you need php 5.4 or 5.5. Maybe that could help?




回答2:


The issue was not with the SDK but with Facebook itself. I had created a bug report after doing some more tests. Facebook confirmed and fixed the bug. Basically, it had to do with inappropriate permissions handling.

https://developers.facebook.com/bugs/1435856773345641/



来源:https://stackoverflow.com/questions/24006673/why-does-this-facebook-create-album-code-create-duplicate-albums

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!