The attached project shows how to use the device's camera to snap a picture and upload it to your Facebook wall.
This sample is based on the code written by the one and only
vb1992 found in
THIS thread.
- Requirements:
1- Facebook account.
2- Facebook app.
3- Internet connection.
- How to create a Facebook app
In order to use this sample you MUST create a Facebook App first, to do that, go to:
https://developers.facebook.com/apps/ (the system will prompt you to login if you are not, the user name and password required is your Facebook user name and password).
1- After you login you will see the
Create new app window, then, enter a name and click on Continue (you can leave the rest of the fields blank, if you don't have a website then check the "free webhosting by Heroku" and follow the instructions).
2- Enter the
Security check.
3- Fill the information on the
App Details window, you need to enter:
- Contact Email
- Category
- Select WEBSITE and enter your website (or the one provided by Heroku in case you don't have your own.)
- Save changes
NOTES:
Take note of the
App ID and
App Secret you need those values to be added to the B4A project as well as the
Site URL.
The first time you run the app you'll be prompted to login to Facebook, there's no log off option, the workaround is to CLEAR DATA & CLEAR CACHE, I need to investigate how to do that by code.
There are a few notes in the B4A project, just follow those simple instructions and you are done.
Enjoy!!