apprequests dialog not showing list of the friends - ios

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.

Related

Facebook ios dialog suddenly stopped working

I am working with Facebook SDK to share a message on the user's wall.
It was working fine until yesterday, but now it's broken.
I started getting message:
An error occured please try again later.
Did anything change on the Facebook side that prevents dialog to be present?
dictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Lost Pet", #"name",
#"Help!", #"caption",
url, #"link",
[petInfo objectForKey:#"picture"], #"picture",
description, #"description",nil];
[facebook dialog:#"feed" andParams:dictionary andDelegate:self];
Any ideas how to approach it?
I tried to include app_id in the params.
It looks like your example is prefilling captions for posted images, which is a Facebook policy no-no - you might want to check your app for any developer alerts concerning this, which could be causing the error. You're also using the older "feed dialog" to post. The iOS 3.5 SDK included Native Share dialogs, which are much faster. Check the below resources for how to implement these:
https://developers.facebook.com/docs/howtos/share-native-dialogs-ios-sdk/
https://developers.facebook.com/docs/tutorial/iossdk/upgrading-from-3.2-to-3.5/

Facebook iOS SDK - Simple status update with Dialog

I'm trying to post a simple status update on the Facebook iOS SDK. At the moment, if I include the link parameter, everything will work:
NSMutableDictionary *params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Name here", #"name",
#"Caption here", #"caption",
#"Status update", #"description",
#"http://www.apple.com.",#"link",
nil];
[facebook dialog:#"feed"
andParams:params
andDelegate:self];
But once I remove link none of the remaining parameters are acknowledged and I'm left with a blank message. I simply want to perform the same sort of post you can achieve with Facebook request whereby providing a string for the message parameter is enough for the status update.
Not sure where I'm going wrong.
Actually posing of status messages with feed dialog isn't an option and it's actually not intended to be user like this.
You can consider one of the options:
Requesting publish_stream permission and than issue POST request to Graph API with message parameter (feed connection of user object), see statuses connection documentation (IMO it seems as an good way to go, if you don't afraid to ask publish_stream permission).
Open Facebook App with publishing view (and text pre-filled?), this is described in answer to "How to programmatically open iOS Facebook app with pre-populated status?"
Note: I'm not completely sure about inability to achieve this with feed dialog, so I may be wrong, anyone who know this isn't the case please correct me.

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.

iOS facebook connect feed on wall

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?!

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.

Resources