fb_connect
This endpoint allows users to register via Facebook account.
Provide valid access_token with email extended permission. To generate test access_token, try this tool https://developers.facebook.com/tools/explorer/ and select the app from above drop down that you want to get access_token (You must have joined that app already with email permission to generate access_token) for and then select email from the fields.
By default, only ‘id’ and ‘name’ are added but you need to include ’email’ for user identification.
You will have to first allow extended permission for email in the app joining screen. Please note that above tool is only for testing, you generate valid access_token using the Graph API in your app. You should have prior knowledge of Facebook Graph API to use this endpoint.
Resource URL
/api/userplus/fb_connect/
Method
Required Parameters
- access_token - Provide valid access_token with email extended permission
- key – get API key from Settings > User Plus.
Optional Parameters
- usermeta - Get all user meta with the response
- email - use email address to register as user_login
Sample Request Body
{
"cookie": "ali|1569581303|b0GWzcqbs9nwxCAuBn38yZhWTGaOSwz6ZKlEuKJa73P|73a985ab25c870599b79f6442306676e58a6f83314"
}
Sample Request URL
http://localhost/api/userplus/fb_connect/?key=KEY-HERE&access_token=ACCESS-TOKEN-VALUE-HERE
Sample Response
{
"status": "ok",
"msg": "user logged in.",
"user": {
"ID": 12,
"user_login": "user_name",
"email": "email_address",
"first_name": "Ali",
"last_name": "Qureshi",
"nice_name": "ali",
"display_name": "Ali",
"registered": "2018-11-26 07:13:23"
},
"cookie": "ali|1569581303|b0GWzcqbs9nwxCAuBn38yZhWTGaOSwz6ZKlEuKJa73P|73a985ab25c870599b79f6442306676e58a6f83314"
}