Note that there are some explanatory texts on larger screens.

plurals
  1. POPosting Photo to facebook fan page via iOS app by regular non-admin users
    primarykey
    data
    text
    <p>I am trying to post a photo to my apps facebook fan page and to the users wall also. I have been successful to post the photo on the users wall, but failed to post it in the fan pages wall. (<strong>The user is not necessarily an admin or page owner, just the regular users. As the fan page has the option of anyone can post to it, it is not mandatory for the user to even like the page first. Right?</strong>)</p> <p>After googling a while, I found <a href="https://stackoverflow.com/a/9051364/1156026">this answer</a>. According to it, I need an access_token of the fan page and an album_id to do so. But I can't find any clue about how to get them. So far I have tried this code:</p> <pre><code>if ([appDelegate.facebook isSessionValid]) { NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: resultImage, @"picture", nil]; [appDelegate.facebook requestWithGraphPath:@"me/photos" andParams:params andHttpMethod:@"POST" andDelegate:self]; // to post on users wall, works fine NSString *path = [NSString stringWithFormat:@"my/accounts /fan_page_id?fields=access_toke/photos"]; [appDelegate.facebook setAccessToken: FACEBOOK_ACCESS_TOKEN]; [appDelegate.facebook requestWithGraphPath:path andParams:params andHttpMethod:@"POST" andDelegate:self]; // to post on fan page wall, this doesn't work } </code></pre> <p>Can anyone help me with this? What am I missing here? Thanks in advance.</p> <p><strong>UPDATE</strong></p> <p>According to <a href="https://stackoverflow.com/a/9354402/1156026">this answer</a>, a regular user can not post a photo to the fan pages wall from an iOS app but can share the photo on it. Now, my question is, how do I accomplish posting the photo on the users wall and share it on the fan page wall at the same time? Is it possible? How do I share the photo on the fan page wall?</p> <p><strong>UPDATE 2</strong></p> <p><a href="https://stackoverflow.com/a/8691767/1156026">This answer and the question</a> says that the regular users can post to a fan page wall via news feed, so i modified my code like this:</p> <pre><code>if ([appDelegate.facebook isSessionValid]) { NSMutableDictionary *page_params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"fan_page_id", @"to", @"Test", @"name", @"Test", @"caption", resultImage, @"picture", nil]; [appDelegate.facebook dialog:@"feed" andParams:page_params andDelegate:self]; } </code></pre> <p>But, I keep getting this ridiculous error message and the app crashes: </p> <pre><code>-[UIImage length]: unrecognized selector sent to instance 0x24d110 2012-06-06 19:59:03.114 app_name[2739:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage length]: unrecognized selector sent to instance 0x24d110' </code></pre> <p>What should I do now?</p> <p><strong>At this point after waiting so long, the question comes in my mind is, is this even possible? If so, how do I accomplish this task? And if not, then what are the alternatives? Please help.</strong></p> <p><strong>Update 3</strong></p> <p>Just found that there is a <a href="https://developers.facebook.com/bugs/379697955378489" rel="nofollow noreferrer">known bug</a> in both iOS sdk and the javascript sdk for posting dialogs in fan page wall. Is this true for image upload too? If anyone has a solution to avoid this bug, please help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload