iOS facebook connect feed on wall - ios

I am trying to post a feed on the fb wall using a new application with a certain API key, It's not posting anything on the wall, I have tried the same thing with another API key(other app) with the same settings and permissions of (publish_stream) and it worked (still working in a 10 minutes time difference between post and another wich is weird as well)
using this simple code:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"some text", #"message",
nil];
[facebook requestWithGraphPath:#"/me/feed" andParams:params andHttpMethod:#"POST" andDelegate:self];
Any Idea?!

Related

apprequests dialog not showing list of the friends

On the native iOS application code described at Facebook documentation http://developers.facebook.com/blog/post/2012/04/26/android-and-ios--discovery-via-requests-best-practices/ present very interesting usage of the deprecated app request dialog
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Check out this awesome app.", #"message",
nil];
[self.facebook dialog:#"apprequests"
andParams:params
andDelegate:self];
It shows dialog but without any friends. I saw ton of troubles with this code at stackoverfloww but related to filters param. But actually I am not using filters at all. And it don't want to show list of the friends. Could it be related to SDK API change? Because several month ago it worked perfect.

FBConnect: How to display standard FB dialog to post a picture and caption?

I can post a picture to FaceBook, without any user interaction, this way:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
facebookMessageTextView.text, #"message",
imageToSend, #"source",
nil];
FBRequest *request = [facebook requestWithGraphPath:#"me/photos" andParams:params andHttpMethod:#"POST" andDelegate:self];
Now what I would like to do is to display a standard FB dialog, so the user can modify the caption, and possibly decide to post to some other person's wall, or send as a private message. Such as (from the iPhone Facebook app):
I don't need the camera button as the image I pass in is not to be replaced. But I would like the user to be able to select to post to their wall, to another user's wall, change caption and privacy. How would I do so? And can I also select to send this image as a private message?
UPDATE: I can send a photo that is already uploaded to a user's album (via the above code), to their friend's timeline, using this:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"http://www.bitsonthego.com", #"link",
[fbID objectForKey:#"id"], #"object_attachment",
#"my profile", #"name",
#"description", #"description",
#"name of the post", #"name",
#"caption of my post", #"caption",
facebookMessageTextView.text, #"message",
nil];
[facebook requestWithGraphPath:#"/{friend's id}/feed" andParams:params andHttpMethod:#"POST" andDelegate:self];
I still can't seem to use a dialog to specify the friend's in a standard Facebook UI, and it seems I will have to write my own UI to do this. Or?
Via the Facebook Graph API (the replacement to fbconnect) with publish_stream permissions, you are able to only post a photo to a user's wall or user's album.
Also the API does not allow sending of private messages. I am not aware of any iOS dialogs to assist you in doing this.
However, you might want to look at something called intents as it's called in the Android world, where your app says I want to let the user do this, and then the OS will give the user an option of what program they want to do it in if there are multiple programs. I found this S/O article on iphone equivalent to android intents for opening other apps. Maybe there's something in there you can use for iOS.

iPhone Facebook app not showing a link when displaying application name on a wall posting made by iOS app

I have written an iPhone app that includes a feature to share images with facebook. It uses the following code to post images to the users wall.
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
img, #"picture",
photoItem.caption == nil ? #"" :
photoItem.caption,#"name", nil];
[facebook requestWithGraphPath:#"me/photos"
andParams:params
andHttpMethod:#"POST"
andDelegate:self];
It posts the photo up on the wall with no problems. When viewing the wall with Facebook on a desktop computer, the app name is a link that takes you to the facebook app page.
When viewing the same posting on the iPhone or Android facebook app, the app name is no longer a link.
Am I doing something wrong? Is this a bug or by design?

Feed dialog generating errors with iOS SDK

UPDATE: This problem was resolved when facebook fixed their service.
I'm trying to get the feed dialog to work for sharing with facebook. I had it all working before with the old, deprecated API and SDK, but have just moved to using the current iPhone SDK and am trying an example directly from the documenation here;
I keep getting the error, "Error with publishing" "There was a problem generating the Feed story from the provided data" and I cannot see what I'm doing wrong. Note that I have taken out the message parameter as it was deprecated in July, but I get the same problem whether or not that parameter is present.
Facebook *facebook = [[Facebook alloc] initWithAppId:kFacebookAppId andDelegate:self];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kFacebookAppId, #"app_id",
#"https://developers.facebook.com/docs/reference/dialogs/", #"link",
#"http://fbrell.com/f8.jpg", #"picture",
#"Facebook Dialogs", #"name",
#"Reference Documentation", #"caption",
#"Using Dialogs to interact with users.", #"description",
nil];
[facebook dialog:#"feed" andParams:params andDelegate:self];
Can anyone see what I might be doing wrong?
Thanks!
The page http://developers.facebook.com/live_status reports the issue today at 16:49 (GMT+1)
To follow the issue : https://developers.facebook.com/bugs/295765603772094
I don't think you are doing something wrong.
Just experienced the same problem with with my working app.
Most likely an issue on the side of facebook
You can use direct REST API or Graph API calls that are working now.

facebook sdk for ios feed dialog problem, not showing post although it posts

image for iphone with facebook feed dialog
I share on facebook through the following method in the delegate who is called from all portions sharing in my app the feed dialog pops up with no content but it is actually posts on facebook wall what is wrong with my code?
-(void)shareOnFaceBook:(NSMutableDictionary *)dic
{
if(self.facebook ==nil)
{
self.facebook= [[Facebook alloc] initWithAppId:#"238314679531075"];
NSArray* permissions = [[NSArray arrayWithObjects:
#"email", #"read_stream",#"publish_stream", nil] retain];
[facebook authorize:permissions delegate:self];
}
[self.facebook dialog:#"feed" andParams:dic andDelegate:self];
}
thanks
There is a bug reported as per the comment from Albert. but in the mean time, you can post to facebook by making an HTTP Post to the Graph API.
[self.facebook requestWithGraphPath:#"post" andParams:yourParameters andHttpMethod:#"POST" andDelegate:self];
You will have to implement your own view controller but that should be straightforward. At least something to get you ahead while waiting for the bug to be fixed.

Resources