Publishing links to user's wall using Facebook iOS SDK

I'm trying to publish a link to the user's wall on Facebook after he has already logged in using the new Facebook iOS SDK.

I want the link to behave as if the user posted it from his account. For example, if I post this link on my Facebook wall: http://www.apple.com/, I won't see the link. What I'll see is an image, a caption with the actual url and a short description. But when I publish this same link from my app, all I see is the link itself.

How can I publish this url through my app so that what will eventually appear on the user's wall is the formatted message as it would appear if he would have posted it from his account on the pc, and not just the link itself as a string?

Thanks,

Answers


EDIT: The code below is for an OLD version of the FB SDK

Check here for a more up to date answer that may help Facebook sdk post on wall on iPhone app

OLD POST:

From http://developers.facebook.com/docs/reference/dialogs/feed/

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
  kAppId, @"app_id",
  @"http://developers.facebook.com/docs/reference/dialogs/", @"link",
  @"http://fbrell.com/f8.jpg", @"picture",
  @"Facebook Dialogs", @"name",
  @"Reference Documentation", @"caption",
  @"Dialogs provide a simple, consistent interface for apps to interact with users.", @"description",
  @"Facebook Dialogs are so easy!",  @"message",
  nil];

[_facebook dialog:@"feed" andParams:params andDelegate:self];

You need to use FBStreamDialog for this. I do not have the exact code. Try this:

FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.delegate = self;
dialog.userMessagePrompt = @"What's in your mind?";
dialog.attachment = @"{\"name\":\"Apple URL","
"\"href\":\"http://www.apple.com\","
"\"caption\":\"App Name\",\"description\":\"Posting link Test\","
"\"media\":[{\"type\":\"image\","
"\"src\":\"http://www.apple.com\","
"\"href\":\"http://www.apple.com\"}],"
"\"properties\":{\"another link\":{\"text\":\"Apple home page\",\"href\":\"http://www.apple.com\"}}}";
[dialog show];

Need Your Help

Rename Pandas DataFrame Index

python pandas dataframe

I've a csv file without header, with a DateTime index. I want to rename the index and column name, but with df.rename() only the column name is renamed. Bug? I'm on version 0.12.0

Why doesn't this memory eater really eat memory?

c linux memory virtual-memory

I want to create a program that will simulate an out-of-memory (OOM) situation on a Unix server. I created this super-simple memory eater: