POST api/user/facebooklogin

Login or Sign up to the system with Facebook's info

Request Information

URI Parameters

None.

Body Parameters

User's Facebook information for login

FacebookUser
NameDescriptionTypeAdditional information
fb_id

Facebook ID of the user

string

Required

Max length: 40

fb_name

Name of the user on Facebook

string

Required

Max length: 1024

fb_email

Email of the user's Facebook account

string

Max length: 1024

fb_picture

Picture of the user's Facebook account

string

Max length: 1024

fb_access_token

Access Token of the user's Facebook account

string

Max length: 1024

Request Formats

application/json, text/json

Sample:
{
  "fb_id": "sample string 1",
  "fb_name": "sample string 2",
  "fb_email": "sample string 3",
  "fb_picture": "sample string 4",
  "fb_access_token": "sample string 5"
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'FacebookUserDTO'.

Response Information

Resource Description

Message with API result, if sucess(200), User info like user UID will return; if fail in input(400), error message will return; if fail to login, will return Unauthorized(401)

LoginResponse
NameDescriptionTypeAdditional information
Message

Message of the API

string

None.

User

User info

User Info

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "User": {
    "user_uid": 1,
    "display_name": "sample string 2",
    "fb_picture": "sample string 3",
    "account_balance": 4.1,
    "user_create_date": "2018-01-23T02:08:08.4570707+08:00",
    "user_last_login_date": "2018-01-23T02:08:08.4570707+08:00",
    "disabled": true,
    "rating": 7.1,
    "total_buy": 8,
    "total_sell": 9,
    "total_post": 10,
    "total_comment": 11,
    "total_be_commented": 12
  }
}