objective c - iOS Facebook SDK Post a picture on a Page where i have admin rights -


i'm having problem while trying post picture on fb page i'm admin. picture uploaded on own account instead of page.

here's code i'm using this:

- (void)apigraphuserphotospost:(uiimage*)img  withmessage:(nsstring*)message {      nsuserdefaults *defaults = [nsuserdefaults standarduserdefaults];     nsuinteger c;     (c = 0; c < [gfbpagearray count]; c++)     {         if ([[[gfbpagearray objectatindex:c] objectforkey:@"name"] isequaltostring:[defaults objectforkey:@"fbpostas"]])             break;     }     params = [nsmutabledictionary dictionarywithobjectsandkeys:               img, @"picture", message, @"message", [[gfbpagearray objectatindex:c] objectforkey:@"access_token"], @"access_token",nil];     [[self facebook] requestwithgraphpath:[nsstring stringwithformat:@"/%@/photos", [[gfbpagearray objectatindex:c] objectforkey:@"id"]]                                        andparams:params                                    andhttpmethod:@"post"                                      anddelegate:self]; } 

[defaults objectforkey:@"fbpostas"] contains name of fb page want upload picture.

gfbpagearray contains list of fb page have admin rights.

am doing wrong?

i've done similar /pageid/feed , /pageid/videos , works well...

you can find answer problem here: picture-post-to-facebook-ends-up-in-the-wrong-place

if want can put more details here (copy/past) code.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -