Get request_ids in a canvas app - facebook

I have a facebook canvas app like this: http://dpaste.com/809111/
I use this to redirect user on my site when a user invite friends on my site with facebook multi friends selector.
When a user receive the request on facebook, he clicks on a link like this:
http://apps.facebook.com/XXXXX/?fb_source=notification&request_ids=XXXXXX&ref=notif&app_request_type=user_to_user
and then, through my facebook canvas app will be redirect on my site.
Ok, perfect.
Now, i would want to catch request_ids and redirect the user on a custom link, like this:
mysite.com/invite/?request_ids=XXXXXX
to track invite and result from invite.
Thanks in advance.

Solved with $_GET[request_ids], easy :)

Related

How can i select facebook user friends in facebook application?

i am new in facebook application. now i am working on facebook application and i want some effect like in facebook when we go in our profile and on status update we can see one facility like who are with you? means we can tag our facebook friend at the place where we are at that time. i want this effect in my facebook application, so i can tag my friend at where am i? i that any api for fetch our facebook friend and tag them?i tried to get friend but i only display it i can not select them.Thank you in advance.
Try this.
You can create a tag on the photo by issuing an HTTP POST request to the tags connection, PHOTO_ID/tags.
https://developers.facebook.com/docs/reference/api/photo/

Post to facebook like twitter

Is is possible to post something to facebook, like on twitter?
I mean when user click a link, like this https://twitter.com/intent/tweet?url=http://google.com&text=Hello%20world but for facebook?
Yes, Use https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.google.com&t=Hello+World to post the same message to facebook.

Response from edge.create if Like clicker has no FB page

I'm subscribing to a Like button on my page to notify me when someone clicks the Like button. I then give this user a discount for telling their friends about the site. But what if the user doesn't have a Facebook page? Will I still get a call at my handler function. The Response passed by the edge.create call to the handler is just the URL that was liked, so there doesn't seem to be any flag passed that tells me that the user didn't really post anything to a FB page. How can I handle this and not be giving discounts for nothing?
Thanks
What do you mean by "user has no FB page"? Not every Facebook user will also have a Facebook page. I only have pages on my Facebook user account are there solely for testing purposes. If I wasn't developing apps with the Facebook API, then I wouldn't have any at all. So requiring your users to have a Facebook page may not be in your best interest. Just let them like your website using their normal Facebook user account.

How to use apprequest to redirect user to the application profile page instead of the canvas page?

We are working on a web-based game and we would like to promote it via Facebook. Currently we are using facebook connect to allow user to login and post game related messages to their wall via wall posts, FB.ui({method: 'feed', ...);. In addition we like to our users to invite other users to join our game. For this we use apprequest, FB.ui({method: 'apprequests' ....); However this will lead the invited users to the canvas page, which we don't have. We could workaround this by creating a canvas page in facebook and let it simply redirect users to where we want. But is there a cleaner way to lead the users to the application profile page or the web site it self?
My thanks in advance.
Albert see: How can I redirect to my app page after accepted a app request sent from our app?
In short, you will need to pass the redirect url in the data parameter of the request and use javascript to do the redirect once the user has landed on the canvas page.

facebook API limitations (iframe)

On sign-up (i.e. when accessing the app), we need to get user's permission to invite their friends to use the app. When a user has finished using the app and the picture displays on their wall, we need to share the post with all of their friends automatically
Can this be done in FB application running from iframe? What would be the easiest approach to do this.
You can't automatically send out invites. You can present the user with a form to pick friends to invite, but your app can't do it on their behalf.