how to add default message to facebook statusbar(pinwall)?
hi to all i am new to iphone, i need to post message on the wall of facebook by using this url (http://www.facebook.com/connect/prompt_feed.php?message=hello) i can post message on wall but i want to post message dynamically means(access messages from database and stored in array display all these messages on tableview when select message on tableview that selected message display in wall of face开发者_如何学Cbook)any one help to me how to post selected message on wall of facebook.
Try this code:
http://www.facebook.com/connect/prompt_feed.php?message=[yourarray objectAtIndex:index]
Write the above code inside the below given method
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
Ok assuming you know how to post a specific message to FB wall, you can try the following:
- Create a NSArray of all the strings you want to post to the FB wall
- Populate the table view making the above array as datasource and implementing the tableview delegate methods
- You can get the index of the row selected in the delegate method didSelectRowAtIndexPath
Retrieve the item from the array and use it in your post string as follows
@"http://www.facebook.com/connect/prompt_feed.php?message=%@",[myArray objectAtIndex:index]
Post the string to FB
精彩评论