Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:44:04+00:00 2026-06-17T04:44:04+00:00

Possible Duplicate: Facebook API: Post on friend wall I’m trying to post the message

  • 0

Possible Duplicate:
Facebook API: Post on friend wall

I’m trying to post the message on a friends wall. But it doesn’t work with my below code,

 NSMutableDictionary* params = [NSMutableDictionary dictionary];
 [params setObject:@"Some text" forKey:@"user_message_prompt"];
 [params setObject:@"another text" forKey:@"action_links"];

 [facebook requestWithGraphPath:@"****FB ID here *****/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];

I tried many ways to figure it out, but couldn’t find the solution. Please let me know what I did wrong in my code. I need a quick help to resolve.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:44:05+00:00Added an answer on June 17, 2026 at 4:44 am

    This is how I push messages to a friends Facebook wall:

    In your .h file:

    #import "FBConnect.h"
    #import "FBRequest.h"
    #import "FBLoginButton.h"
    
    ....
    
    Facebook* _facebook;
    NSArray* _permissions;
    
    ...
    
    @property (readonly) Facebook *facebook;
    

    In your .m file:

    @synthesize facebook = _facebook;
    

    In viewDidLoad:

    _permissions =  [[NSArray arrayWithObjects:@"user_photos",@"user_videos",@"publish_stream",@"offline_access",@"user_checkins",@"friends_checkins",@"email",@"user_location" , @"read_stream", @"read_friendlist",nil] retain];
    _facebook = [[Facebook alloc] initWithAppId:kAppId];
    
    
    
    SBJSON *jsonWriter = [[SBJSON new] autorelease];
    static NSString* kAppId = @"your app key";
    
    NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:@"your title",@"text",@"http://itunes.apple.com/us/app/facts!/id434894484?l=de&ls=1&mt=8",@"href", nil], nil];
    
    NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
    NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
                                        @"Title of the post", @"name",
                                        @"Caption of the post", @"caption",
                                        @"Some description", @"description",
                                        nil];
    
    NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
    
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                           kAppId, @"api_key",
                                           @"Share on Facebook",  @"user_message_prompt",
                                           actionLinksStr, @"action_links",
                                           attachmentStr, @"attachment",
                                           @"your friends id", @"to",
                                           nil];
    
    [_facebook dialog: @"stream.publish" andParams:params andDelegate:self];
    

    One thing has to be clear. You can only post to a friends wall when he is really in your friendlist, otherwise it will not work. I tested the code on my profile and it works!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Facebook post on Friends wall in Android I have made an app
Possible Duplicate: Facebook online friend I am using the Facebook Graph API and I
Possible Duplicate: Google plus api for posting on wall like facebook I have checked
Possible Duplicate: How to delete a Facebook comment post using the Facebook GRAPH API?
Possible Duplicate: Add picture at facebook event with Graph API I have been trying
Possible Duplicate: Facebook Connect error: can't post to wall in iPhone I had a
Possible Duplicate: Facebook like callback, and post it to target to like I'm trying
Possible Duplicate: How to get friend's birthday list using facebook api? I'm developing an
Possible Duplicate: Facebook iOS SDK Poke I want to poke a facebook friend using
Possible Duplicate: Facebook API - How to get user’s address, phone #? Is it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.