How can i get requestId from facebook api when i invite someone - facebook

I want to use facebook unity sdk to achieve the function that can invite new player from my facebook friends.I can't find how to get requestid if the friend click the notify then he go to appstore and download the game.
I already know i can get all requests from facebook by using me/appresquest function,but it is not my wonder.I just want get a definite requestid so I can only get one invter to give him reward when a friend click the notify who send to.the facebook just say "When a recipient accepts a request on a mobile platform, this will deep-link to the app. An additional parameter will be present in the loading of the app, the request ID."
I coundn't find any ways to get the purpose.From the docs,I guess the requestId will be sent to ios or Android when the new user click the notify,then the player download the game.the os will give the requestId if the player first open the app,the facebook Unity SDK could get the requestId,so the developer could get it from SDK.but is that right?i don't know,and i want to know how to get it.
Please help me (some question is so far from now,i think it's out of time,please give me the lateset advices)

Related

Getting my facebook friends IDs for javafx desktop application

Developing a desktop application(javafx) where I need to retrive a list of my Facebook friends ID - what I know so it'is imposible to do by just sending ".../me/firends" (with version 2.3+) because that give me in responds just a number of friends.So I figure to use facebook friend selector to first send invite and in case of acceptance get user ID-but it seams like invites are only available for android and ios link - any ideas how can I takle that issue?

Understanding Facebook SDK app requests vs app invitations

I registered a Facebook app that is basically the website, it doesn't run at Facebook like those browser games.
I want the site users that register with Facebook to be able to invite their friends, I did this by using "requests", it opens a Facebook hosted URL where I select the friends to invite, looks like this:
But these requests only show on receiver's end if he/she goes here , I don't even where to click to reach that page, and from other users I receive invitations to apps that they show in top right corner under the globe icon, how do I do that ? Or is that limited to "canvas" applications that run directly on Facebook ?
Are there different ways to invite people to an app ?
I want the receiver to see it like this:
Not like this:
As #CBroe has already stated, Invites / Requests are limited to Canvas Apps (Apps that work within Facebook) or Mobile Apps. The app category also has to be configured to be a game (another category won't work).
The facebook documentation says:
Requests are currently only available for games on Canvas, iOS or Android.
In order for the Request to work, you need to configure the Canvas Page URL:
When a user accepts a request, either through the notification jewel, the beeper popup, or App Center they will be sent to the Canvas Page URL of the app that sent the request.
Read up on the Request documentation.

Is this the best way to integrate and use the Facebook API "toolset" in my quiz game?

Im currently building a simple time based quiz game with Javascript. In this game im looking to enable the option of being able to challenge your facebook friends.
This has naturally had me look at the Facebook (API) tools available that would allow me to interact with the targeted friends to be challenged.
Im wondering if anyone could comment on my approach of the Facebook tools intended to be used and whether there's actually some better approach or even Facebook tools that I have missed and should consider in my setup.
My intention is to interact and engage with the friends I challenge / invite using the most relevant Facebook tools available.
1. FB Login - USER CREATE / LOGIN
The user connects through Facebook login - either creating a
user profile or automatically getting logged in upon visit, if the
fb_uid already exists in the DB. We get access token, email and all the basic stuff.
2. FB Request dialog - CHALLENGE YOUR FACEBOOK FRIENDS
The user clicks a "Challenge your friends" button and the Facebook Request dialog is initiated showing the inbuilt Facebook multi friend invite selector box. The user click some friends and submits.
= RESULT - A request to the friend is now viewable and visible in the App center
3. FB App Notifications - Engage more "visible" with your challenges friend
Upon submit from step nr 2, we would also initiate a App Notification call to the Graph API, that would eneable us to "post" a notification direct into the challenged notification tray.
There are some restrictions on which user you can post directly into the tray at, which would leave us to do some pre-checking on the basis of:
3.1 - First check if the challenged/invited user already has authorized the app
3.2 - If 3.1 is true, then initiate the App notifications Graph API call = notification posted to the tray.
One important note to this step - i've read that before you can initiate this call, then you need to fetch the Access token of the app itself and make the call to the Graph API with the app access token and not the user access token - not sure if anyone can confirm this.
3.3 - If 3.1 is false, then we're just left with the request to the app center.
QUESTIONS:
Q1. The intended interaction of challenging/inviting your friends in step nr 2 "worries" me a bit. Seeing the request ends up in the App center ONLY, the only way the user will see the notification is "accidently" seeing a number next to the App center left menu link. To me it seems unlikely few people will react to this??
Q2. The real engaging interaction seems to be in App Notifications - however you can only use this with users that ALREADY have accepted your app, leaving out a big chunk of people to interact more "visible" with.
I do know this restriction is probably due to spammy behaviour.
Are this really the most optimal approach of the Facebook toolset I can use in my little game?
The general idea of your approach seems fine. I've never had any experience with App Center, so i can't really comment on how effective and easy it would be implementing that approach, but there is an alternative.
Instead of inviting friends through App Center, you can simply leave a message on their wall using JS feed dialog, asking them to join you in the game (Leave a link or something that will handle the challenge part)

invite friends function of hackbook for iphone doen't work on my iphone4s

i downloaded hackbook from https://github.com/facebook/facebook-ios-sdk/tree/master/sample/Hackbook (* i am not sure this is the right place to download it), because i wanted to know how to send an invitation to a friend from a iphone native application.
i clicked "send invite", then on the pop-up page, I selected a friend(another facebook account of mine) and pushed "send" button.
"Sent request successfully." is displayed on the bottom of the screen.
but I don't get any request.
who can tell me how to send an invitation, better if there is a sample.
thanks in advance.
Check if your application is in sandbox mode. Users who are not listed as developers/testers will not receive invites to applications that they do not have the permissions to view.
UPDATE:
As the OP has discovered (see comments below) - the problem was to do with not having a Canvas URL set up in the application settings.
Im not 100% sure why this is ( being an iPhone native application ). Reading through the documentation ( once again :S ) revealed no stated requirement of the Canvas URL. My best guess is that the request needs to be able to be redirected somewhere after it is accepted, if you dont specify the canvas URL maybe somehow you invalidate the request.
Did all the requests that did not go out appear once you specified the Canvas URL?

How can I use the facebook connect api for the iphone to to invite friends to an application or send a message

In my iPhone application, I wanted to add the function of signing into Facebook and letting a friend know about the app. I know how to sign in and get the friends list, but I cannot find a good way of inviting a friend. So far, I haven't been able to come up with a way to invite a friend (I don't think one can with the iphone facebook sdk yet) or send a message to the inbox. Is there a way to do either of these? If not are there any better options I haven't thought of? Thank you for any advice.
checkout this tutorial. i used it to get the facebook header files sorted out. Once thats done, everything should be in place for you to send a message easily :
http://www.mobileorchard.com/marketing-in-code-part-2-setting-a-users-status-in-facebook-from-an-iphone-app-a-tutorial/
check out This post.it shows what camn we do with facebook api