So out of curiosity or some Facebook application development prospect forced you today to check on a Facebook application and which brought you here to this blog post.
After signing up for Facebook Apps and downloading facebook-platform.tar.gz, you find a sample application named ‘footprints’ inside it. Footprints App is kinda ‘Hello World’ of Facebook applications.
You uncompress the facebook-platform.tar.gz file and follow instructions available in the README file.You are required to do a number of steps before seeing your FB App ‘Hello World’:
- Setup the DB information in the config.php file,
- Create the required table in your DB as described by config.php
- get the app registered on Develop Page,
- Setup application name, get API Key and Secret key
- Add these keys in the config.php file
- Upload the whole directory on your online server,
- Open your FB Developer’s page, select your demo application, and click ‘Edit Settings’, add Canvas Page URL on Facebook for your application, and add Canvas Callback URL (where you uploaded your application) on Canvas page.
Now to view your application, you open this http://apps.facebook.com/your-footprints/ where your-footprints is what you defined in the Canvas Page URL.
Pretty cool, isn’t it? Yeah right as long as you don’t type in your friend’s name and click ‘step’.
This is the warning message on line 52 and a fatal error on line 58 as soon as you hit ‘step’
"Warning: Missing argument 3 for FacebookRestClient::notifications_send()" "Fatal error: Call to undefined method FacebookRestClient::feed_publishActionOfUser"
To remove this warning and fatal error, follow these steps:
Just add a third argument (any string would do) in function notifications_send() call. Just add this on line 52 in lib.php.
'<a href="http://apps.facebook.com/fc-footprints/">See all your Footprints</a>.','your_app_name');
In the same lib.php file, on line 58, replace function feed_publishActionOfUser with feed_publishUserAction which is defined in facebookapi_php5_restlib.php
And by the way, don’t forget to change this URL http://apps.facebook.com/footprints/ in lib.php on several places to your own application’s url e.g. http://apps.facebook.com/your-footprints/
I hope that helps.