flash - When Upload photo to Facebook with Rest API I get duplicate posts in Wall -


i'm developing facebook app flash builder users can create 6 pictures , publish them photo album.

the upload works fine different number of duplicates wall once photos published album. want see post wall last 3 photos i've uploaded, in 1 row. 3 posts same photos, 4 etc... weird post news feed or wall behaves in different way.

this how upload photos

protected function uploadphotos(event:mouseevent):void {     var values6:object = {caption:'caption', filename:'file_name', image:img6};     facebook.callrestapi('photos.upload', handleuploadcomplete6, values6, 'post');      var values5:object = {caption:'caption', filename:'file_name', image:img5};     facebook.callrestapi('photos.upload', handleuploadcomplete5, values5, 'post');      var values4:object = {caption:'caption', filename:'file_name', image:img4};     facebook.callrestapi('photos.upload', handleuploadcomplete4, values4, 'post');      var values3:object = {caption:'caption', filename:'file_name', image:img3};     facebook.callrestapi('photos.upload', handleuploadcomplete3, values3, 'post');      var values2:object = {caption:'caption', filename:'file_name', image:img2};     facebook.callrestapi('photos.upload', handleuploadcomplete2, values2, 'post');      var values1:object = {caption:'caption', filename:'file_name', image:img1};     facebook.callrestapi('photos.upload', handleuploadcomplete1, values1, 'post'); } 

did have same problem? find out going wrong here can't facebook api documentation/forum.

thanks

i have exact same problem, , far know, there isn't way make not happen - seems every time upload photo, there wall post. seems (i seems because, noted, isn't covered in fb's documentation) number of duplicates varies according interval between each upload - if they're received , published facebook within milliseconds of each other, tends 1 update, if there's more time between each post , response, there more wall posts.

i've found 2 ways deal -

  1. remove publish_stream list of permissions request - app won't trigger wall posts. photos upload user held temporarily, , user can approve them going photo album , interacting dialog provides - "an app has added these photos, approve/disaprove?" sort of thing.
  2. go , delete wall posts after fact. last 10 wall posts, @ each 1 determine (through album id, photo id, message text, whatever) it's notification regarding photos app posted, , delete extras. isn't reliable, because needs run after notifications on wall - , again, facebook doesn't provide way tell when happens.

i went option 2 on app did recently, , make work 95% of time building in delay between when photos posted, , when user's wall scraped posts, removing photo upload notifications.

hopefully else posts better way, because way sucks - suspect might way until facebook addresses this.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -