I am trying to use the facebook dialog to send request to my friend using the following:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Come check out my app.", #"message",
nil];
[facebook dialog:#"apprequests"
andParams:params
andDelegate:self];
the delegate - (void)dialogDidComplete:(FBDialog *)dialog { was triggered but apparently I dont see anything on my friends account. I've added him as a tester of the app through the developer account. Why is this?
From https://developers.facebook.com/docs/requests/:
User to User Requests are only available for Canvas apps, not
websites, as accepting a request will direct the user to the Canvas
Page URL of the app that sent the Request.
Do you have a canvas url specified in your app settings?
Also what does the response look like from Facebook at the completion of the dialog? It should look like:
{
request: 'REQUEST_OBJECT_ID'
to:[array of USER_IDs]
}
Related
I have a iOS mobile application that needs to send out an app request to a user's friends. From here:https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk and here:https://developers.facebook.com/docs/reference/dialogs/requests/#mfs it appears I am able to suggest the users that this app requesst gets sent to. I am making the call like this:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Check out this awesome app", #"message",
#"1xxx4,10xxxx0,", #"suggestions",
nil];
[self.facebook dialog:#"apprequests"
andParams:params
andDelegate:nil];
However, once the multi-friend request dialog is presented, I am still able to type in a friends name, even if it was not part of the "suggestions". How do I make this restriction?
The end goal is to restrict that list to facebook friends who are not users of this app. The docs also mention a "filters" parameter, but i have not got that to work.
Ideas?
I'm sending an app request from my iphone app, using this code:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Join my app", #"message", [NSString stringWithFormat:#"%#", [[filteredContacts objectAtIndex:path] valueForKey:#"id"]] ,#"to",
nil];
[facebook dialog:#"apprequests"
andParams:params
andDelegate:self];
while [[filteredContacts objectAtIndex:path] valueForKey:#"id"] returns a facebook ID value.
When a FB friend of mine gets the request he can see it in the notifications section on his facebook - but only on the website itself.
When trying to find it in the facebook iphone app - it's just not there. also, it's not found on the mobile site.
How can it be posible that I see the notification on the website only?
Well the answer was very simple -
I should have define the app as a mobile app when I created it as a FB app.
HI I have got Facebook Connect working with a functional login and logout button. So far thats it, when I press a button a I want to post something to the user. Is there something I have to authorize? What is the precise steps for this. Thank you.
If you want to publish content to User's Feed you not required to authorize user if you use Feed Dialog for any other ways you required to authorize user prior to content publishing.
For web applications/sites (which isn't the case) there is also way to leverage automatic publishing of content user liked using Like Button social plugin by providing correct OpenGraph meta tags.
You really need to read documentation for iOS SDK, especially Dialogs and Authentication and Getting Started Guide.
if you want to set his status thought your FB app without showing a dialog you could do it like this
NSString *message = #"some text";
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:message, message,nil];
[fb requestWithGraphPath:#"me/feed" andParams:params andHttpMethod:#"POST" andDelegate:self]; //fb here is the FaceBook instance.
and for sure you will do that after the user login and authorized the permissions .
To Authorize the permissions
if (![fb isSessionValid]) {
NSArray *permissions = [[NSArray alloc] initWithObjects:#"user_likes", #"read_stream", nil];
[fb authorize:permissions];
[permissions release];
}
I'm trying to let users create an event on my public Facebook page via an iPhone app, and hopefully let ppl invite their friends to that event.
The idea is that the iPhone app will be able to show the users events from that page, while everyone is able to add the events.
After Authorizing with permissions: create_event and manage_pages, i'm trying to run the following code:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"My Event",#"name",
PAGE_ID, #"page_id",
#"2011-11-10T13:30",#"start_time",
#"2011-11-11T13:30",#"end_time", nil];
[facebook requestWithGraphPath:[NSString stringWithFormat: #"%#/events", PAGE_ID]
andParams:params
andHttpMethod:#"POST"
andDelegate:self];
And I get and error saying: "(#200) Permissions error".
Is it even possible? (creating an event on a page which a user doesn't own)
and if so, what am I missing?
permissions = [[NSArray alloc] initWithObjects:#"offline_access", #"user_events",#"create_event",#"rsvp_event", nil];
I hope that it is just your help.
I am trying to get my iPhone application to post a message to a user's facebook wall.
I have created a facebook app and specified the value of the kAppId in my iphone application.
When i test the iphone app in the simulator, i am prompted to authorize the facebook application, which i accept. however, i then immediately get the message "safari cannot open the page because the address is invalid".
I am trying to troubleshoot this error but am not really getting anywhere. Could it be because my facebook app currently shows: "Directory Status: Not Submitted" ? (I am not able to submit it to the facebook App Directory until i have 5 - 10 users.)
FYI - I have added a "publish to facebook" button in one of my view controllers that responds with the following method:
-(IBAction) publishToFacebook {
facebook = [[Facebook alloc] initWithAppId:kAppId];
[facebook authorize:nil delegate:self];
NSMutableDictionary* params =
[NSMutableDictionary dictionaryWithObjectsAndKeys: kAppId, #"app_id", #"http://www.something.com/", #"link", #"http://www.something.com/something.jpg", #"picture", #"My App Name", #"name", #"The Caption...", #"caption", #"The description...", #"description", #"the message...", #"message", nil];
[facebook dialog:#"feed" andParams:params andDelegate:self];
}
Thanks. Looks like i got this figured out. basically, just follow the instructions on developers.facebook.com/docs/guides/mobile/#ios) and be sure to prefix your app id with "fb" in the plist file (ex. fb123456789 where the facebook app id is 123456789)
Also, to answer my question, your facebook app does NOT need to be submitted to the directory for it to work with iPhone integration.
Did you update your info.plist file with your appid so it knows you to jump back to your app properly?