Note that there are some explanatory texts on larger screens.

plurals
  1. POgoing crazy - how to set up an fb-app so my iOS-App can post to it's wall?
    primarykey
    data
    text
    <p>Ok, I know how to post to a USER's wall (timeline?), that works well.</p> <p>What I want is when the user does certain things on his iPhone, that should appear as a post on the APP's wall. The post should be in the USER's name.</p> <p>Something like:</p> <p>Lucky Luke says: hi everybody</p> <p>Zaphod Beeblebrox started using Awesomeapp</p> <p>PLUS: only users of the app should be able to post to the app's wall (I saw the settings on the page's «Manage Permissions»-part where I can set who can post to the wall. I don't want everybody to make posts)</p> <p>If I'm right, that post would automatically appear in the user's feed, too, wouldn't it? Or do I have to make a second post to the user's wall?</p> <p>I request the following permissions when a user first uses the app: @"user_photos",@"user_videos", @"manage_pages",@"read_stream", @"publish_stream",@"user_checkins",@"friends_checkins",@"email",@"user_location"</p> <p>(recently added the read_stream and manage_pages as I read that somewhere - didn't help, though :)</p> <p>This is the piece of code I use to make the post:</p> <pre><code>NSString *graphPath = [NSString stringWithFormat: @"/%@/feed?access_token=%@", FBAppID, [FBAccessToken stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]; NSLog(@"graph path %@", graphPath); NSDictionary *postParams = @{ @"Test": @"message" }; [FBRequestConnection startWithGraphPath:graphPath parameters:postParams HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { if (error) { NSLog(@"error: domain = %@, code = %d, %@", error.domain, error.code, error.description); } else { NSLog(@"Posted action, id: %@", [result objectForKey:@"id"]); } // Show the result in an alert }]; </code></pre> <p>Which returns an error 100 (Missing message or attachment - OAuthException)</p> <p>I googled like two days now and couldn't find any appropriate guidelines... HELP!!! :)</p> <p>[Edit] I might be on to something...</p> <p>Seems like the <code>NSDictionary *postParams @{@"Test": @"message"};</code> was the problem. When I used the proper <code>[[NSDictionary alloc] initWithObjectsAndKeys: ...];</code> it seems to work... we'll see :)</p> <p>[Edit] Ok - I should take a break, it seems...</p> <p>initializing a dictionary with @{...} requires the key first and then the object, vs [NSDictionary dictionaryWithObjectsAndKeys:...] which sets the object first and then the key... </p> <p>I feel kinda stupid right now...</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.
    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