I am trying to create a sweepstakes application.
I am trying to copy wildfire.
But I am unable to create facebook applications dynamically like they are doing.
I checked it they are using graph api to show on front end but there is no method available in graph api to create applications dynamically.
Can anyone please guide me how wildfire is doing dynamic app creation. Is there any alternative available?
In general, they are likely not creating new applications for each client. Unless you can show us evidence of this, it is the same application being installed many times onto their client’s Facebook Pages.
The application script can detect the Page ID and change the display logic appropriately. Seen here:
Get Facebook fan page ID
If you really want to create applications for your clients, take a look at this thread:
http://facebook.stackoverflow.com/questions/6264080/create-a-facebook-application-programmatically
EDIT (Not being able to comment is horrible) in response to J’s post:
There is not a way to create applications entirely programmatically, but you can get really close creating a user-flow around:
Where [key] is the
api_keyof the parent application. It isn’t documented anywhere so you should have a manual fall back in place. The link above does work to create a new Facebook application tied to the currently logged in user (the parentapi_keydoes not seem to have any effect but it is required).To determine the api_key of the application created, ask the user for the appropriate permission and query
/accountsto retrieve a list of Facebook applications the user owns. Do this before and after the user clicks the above link to determine which one was just created. From there, have the user get a newaccess_tokenand get the appropriate permissions to modify application settings. You should then customize the newly created application.Mike