Create working example of Facebook API login in PHP using latest FB PHP SDK

Completed Posted May 9, 2015 Paid on delivery
Completed Paid on delivery

Hello excellent coder!

Summary:

I need a Facebook login written in PHP.

Use the latest PHP SDK from Facebook.

Use their demo code as a starting point.

Do the normal PHP Facebook login flow, as per their documentation.

Extend the user access token to a long-lived token.

Then assume the user has many Facebook pages, and wants to publish to one of their Facebook pages.

Get the list of Facebook pages.

Let the user choose one.

Get a page access token for that page.

The page access token will automatically be long-lived, if you have already made the user access token long-lived.

======

More detail…

======

Permissions required: email, publish_stream

Basic login:

1. Show Facebook button on page.

2. User clicks button to begin Facebook login.

3. User authenticates with Facebook.

4. User is sent back to my server’s callback URL (you can set this to anything - I will adjust it later)

5. Get the Facebook access token.

6. Make a request to Facebook to extend the access token and make it into a long-lived access token

Facebook pages :

7. Make a request for the list of user’s Facebook pages.

If there are any pages found…

8. Show list of pages in a HTML drop down combo box (if user has pages - please make sure to write code and test this scenario)

9. User chooses a page from the list.

10. Make a request for a page access token that matches the chosen Facebook page. Ask for the permissions that are required to publish to page: manage_pages, publish_pages (both are required)

Final output:

11. Create PHP variables or arrays for these things:

- Facebook ID

- permissions that were requested (for user login, and for pages if any)

- permissions that were granted by the user (for user login, and for pages if any)

- permissions that were denied by the user (for user login, and for pages if any)

- list of Facebook pages managed by the user

- page ID (or some other identifier such as URL, etc) of the page that the user chooses

- access token (the long-lived token string for the user)

- expiry

- page access token (long-lived token for the page access, if a page was chosen by the user)

12. Output all these variables to the screen.

End ! :)

=========

Please use your own server to test your code with Facebook.

Please use your own Facebook accounts to test the login. You might want to set up a new Facebook account as a test to use with this job, so you do not have to risk your personal Facebook account.

Add at least 2 Facebook pages to your account, if you need to, so you can test the pages feature.

When finished, and everything works perfectly, please send me a zip file of the PHP code, including the latest Facebook SDK that you used.

=========

Thankyou!

I know you work hard, and I like to pay well for good work.

PHP

Project ID: #7638722

About the project

9 proposals Remote project Active May 10, 2015

Awarded to:

webmajstr

Dear Sir or Madam, I'm web developer with a lot of experience with different programming languages (PHP/MySQL/CSS/HTML/JS ... ). I can create a working example of FB API login and obtaining the variables you want More

$50 AUD in 2 days
(57 Reviews)
5.5

9 freelancers are bidding on average $45 for this job

wpdtpg

Hi, Hope you doing well I am a PHP Developer, have experience of 4yr in PHP and a vast amount of experience in the area of ecommerce sites. I have accomplished many wordpress projects. I am very capable and willing to More

$25 AUD in 1 day
(29 Reviews)
4.9
akilkhatri

Hello, I am akil khatri with my 25+ member team with limited skills and unlimited ideas in Game Development|iPhone|Android|Mobile App Development|PHP|Joomla|Wordpress|Javascript|Java| and |.Net|3D Animation|3D Max| wi More

$54 AUD in 1 day
(10 Reviews)
4.0
lizabotez

Hello i worked to much on 'login by facebook/twitter' APIs. I can do your work in just 1-2 hour. Kindly award me to get it done quickly.

$30 AUD in 1 day
(4 Reviews)
1.7
mitzsuyi

hi i can do this but are you telling me that 25AUD is paying well? i hope you will throw some numbers at me to make it worth my while to do this simple task for you! i look forward to see you smile!

$25 AUD in 1 day
(2 Reviews)
0.6
gd70635

A proposal has not yet been provided

$25 AUD in 1 day
(0 Reviews)
0.0