I am trying to make a FB app which does the following:
i) The app is present on the page Tab. When the user click the pageTab, she is shown a screen[A1] where she can invite her friends to this app.
ii) When the friend gets the notification, she sees another screen [A2] which tells about the app.
What are the ways to do this?
I was wondering if there is a way to identify the source of the requests (other than the url on browser) to differentiate between the two requests to the Apps so that I can render the appropriate screens [A1] or [A2] based on if it is clicked from the PageTab or directly the invite notification.
Thank you.
See https://developers.facebook.com/docs/requests/, section „Accepting a User Request” – your app will get the request id(s), and can then read out the details of the request(s).
If the pure fact that the user came by your app following a request notification isn’t enough for you in your scenario, you can also pass an additional data parameter while making the request, read that out when processing the request, and let your app react accordingly.
And remember that it is your responsibility to delete requests once the user has acted upon them. (Also described in detail in the documentation.)
Related
So I am planning to develop an IFRAME facebook app which lets users buy tickets from Facebook using our website.
Basically I would like to know whether its possible to do what I have in mind.
Each event posted in our website has a specific link associated with it and we already provide a facility whereby event organizers can integrate our app into their website using an IFRAME.
Now I would like to know whether it is possible to have the same concept applied on a Facebook App. Each event will have its own EventId and I do not wish to have all events listed on our App. Each promoter that has his own Facebook page will be able to integrated the APP and will only see his events. Is this possible since you need to bind your Facebook to a specific URL?
Thanks
Yes! This is possible. What you'll need to do is have a tab application that the promoter installs on their page. Each promoter installs the exact same application so you only need to have one.
When the app is loaded within the page, it will receive a signed_request parameter. You'll need to decode it first, but once you do, you'll be able to see where the app is running because the signed_request will contain the page_id. Once you know what page is displaying your application, you'll be able to display appropriate content.
I am working on a page tab application and am having an issue with navigation. My application, written in MVC3, is displaying and authenticating just fine as a page tab. When I click on my tab, my app receives a POST with the signed_request object as expected.
My question is, how can I support links to other pages in my application? When a user clicks on a link, I want an action to be called in my application and to not leave the Facebook iframe. In addition, I need the signed_request to be passed along so I have a user context.
At first, I thought this was not supported and that all page tab applications had to be written as Single Page Applications. However, I found examples that do exactly what I am looking for.
Click on an image:
https://www.facebook.com/Sephora/app_305927716147259
And:
http://woobox.com/pinterest
How are these apps handling page navigation within the iframe?
The performance of clicking on an image seems to be pretty bad. What are they doing behind the scenes and is there a more direct way of handling navigation?
I will also need to handle POSTs.
Thank you.
When a user clicks on a link, I want an action to be called in my application and to not leave the Facebook iframe.
Well, that’s what normal HTML links do – so no extra effort required at this point :-)
In addition, I need the signed_request to be passed along so I have a user context.
You could pass it as a GET parameter with every link – but this way the user can easily “see” it, and it might also get transfered to external servers (if any external resources are embedded within your page) via the HTTP referrer.
The better solution IMHO is store the signed request server-side in your session (parsed already, if you like), so that you have access to it on the following pages of your app.
I've developed an Facebook app: http://ek2012spel.startpagina.nl/. I've developed one before and the last time I've included the option to post a message on your wall whenever you scored a point.
But I noticed Facebook changed it's policy to prevent spamming to a wall. And I salute them for it. So I wanted to try something else.
Include a Like Button.
Only the people that press the Like button get news updates in their stream.
The news updates won't be automated. It will be me telling them a new round has started or something similar.
I'm pretty sure this is (or at least was) possible. Question is; how?
Should I create a seperate Facebook user for my app?
A new page (or is it called tab)? And link the Like button on my app to that page?
Sub issue: My current Like Button is linked to an (old) URL. The URL redirects to the new one. Any chance I can change the URL without losing all the likes?
That document was referring to an old App Profile page - these were removed in February -I've updated that doc to show the current way to create a page for your app (the option is now in the 'Advanced' tab of the app settings.)
Based on what you've said above, you should do one of the following:
Create a page for the app and get users to like it, and then use the page to post updates for the game's user
Use app to user requests to alert the user that something has happened - this will increment a counter in the user's bookmark for your app to bring them back to it
Obtain the user's email address from the API (needs the email permission) and email them directly.
Posting to user's timelines (/USER_ID/feed) automatically each time you have news to share will result in the spam filters shutting down your app very quickly indeed (bear in mind this will appear to all their friends as a message 'from' that user)
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?
I'm attempting to develop my first Facebook app that is designed to allow clients of our website to sell tickets to their events from their Facebook page as well as from our website. So when the administrator of a Facebook page adds our app as a page tab, I need to be able to find out who they are so I can load the relevant event data. There also needs to be additional include/exclude configurations and various other options, which will affect the behaviour of the app.
So my question is how is this situation best handled? When playing around with a basic sandboxed app, I seem to be able to just add the app directly to a page; there is no prompt for configuration, and I can't see any way of defining custom properties.
Is the 'edit_url' property the only way to achieve this? If so, is there a way of automatically directing the page admin to this link upon initial use?
Decoding the signed request recieved in your page will give you more insight.
From this you can retrieve page admins' UID's.
You'll need to manage the rest on your side...
In order to get the user id the user will have to grant your application basic permissions.
I'm currently doing a somewhat similar app and, just like Lix said, I used the signed_request variable to detect the page where the tab is installed. Then, based on the page's ID, I retrieve the proper content.
To also give your users an admin page, add a Page Tab Edit URL in your app configuration where you can redirect your users to a custom panel where they can edit their app.