Post Facebook status update AND url via Iphone SDK
I want to post a status update to users wall. This works, but I dont't know how to post a "pretty" Url with it. It works开发者_运维百科 if I post the full Url, but it doesn't looks good.
My Question:
How is it possible to post a pretty url, like HTML it does: < a href="http://example.de">My Example< /a>
My Code:
NSString *facebookStr = [NSString stringWithFormat:@"%@%@ http://example.de", facebookStatusUpdatePrefixStr, self.theStatus];
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
facebookStr, @"status",
@"true", @"status_includes_verb",
nil];
[[FBRequest requestWithDelegate:self] call:@"facebook.users.setStatus" params:params];
FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease];
dialog.delegate = self;
dialog.permission = @"status_update";
[dialog show];
Thx
If you're going to use the old REST API (now deprecated), you should try the links.post
method. It will allow you to add a comment to the link. It will pull the title from the page itself, and it allows you to specify an image to go along with the link.
If possible, you should really use the new Graph API. It's a much cleaner interface, and it gives you a lot of flexibility while publishing a post with a link.
精彩评论