POST ​/api​/v3​/facebook_auth

Authenticates a user via facebook.

Request

Example Request

{
  "referer_site": "http://www.google.com/",
  "access_token": "3bcfeadd-e33c-4d61-bd6f-2a3e3120e297"
}

Example Parameters

  • referer_site: The referer site from which the app is loaded

    • Required: no
    • Type: string
    • Example: http://www.google.com/
  • access_token: token used to provide temporary, secure access to Facebook APIs

    • Required: yes
    • Type: string
    • Example: 3bcfeadd-e33c-4d61-bd6f-2a3e3120e297

Response

Example Response

{
  "auth_token": "d05fdc6de820cb3c5942be7264f94fa12b280e01f0531859222b517519832553",
  "account_id": 185,
  "is_new_user": true,
  "account": {
    "id": 185,
    "username": "iceman",
    "email": "iceman@example.com",
    "full_name": "Tom Kazansky",
    "bio": "You're everyone's problem. That's because every time you go up in the air, you're unsafe. I don't like you because you're dangerous.",
    "facebook_id": "iceman",
    "twitter_username": "iceman",
    "hometown": "Los Angeles, CA",
    "followers_count": 42,
    "following_count": 42,
    "lineup_count": 42,
    "shows_count": 42,
    "profile_type": "user",
    "follows_you": true,
    "you_follow": true,
    "avatar": {
      "small": "http://assets1.deliradio.com/assets/avatar_small.jpg",
      "large": "http://assets1.deliradio.com/assets/avatar_large.jpg"
    }
  }
}

Response Parameters

  • auth_token: You should save this token securely and use it for any subsequent API call that requires user authentication. You can pass it as a query string parameter called auth_token.

    • Required: yes
    • Type: string
    • Example: d05fdc6de820cb3c5942be7264f94fa12b280e01f0531859222b517519832553
  • account_id: The id of the user

    • Required: yes
    • Type: integer
    • Example: 185
  • isnewuser: Indicates, whether a new user has attempted his api call.

    • Required: no
    • Type: boolean
  • account: The account profile of the user logged in

    • Required: no
    • id: The id of the user
      • Required: yes
      • Type: integer
      • Example: 185
    • username: The user's username that they use to log in.
      • Required: yes
      • Type:
        • string
        • null
      • Example: iceman
    • email: The user's email address.
      • Required: yes
      • Type: string
      • Example: iceman@example.com
    • full_name: The user's full name.
      • Required: yes
      • Type:
        • string
        • null
      • Example: Tom Kazansky
    • bio: The user's bio.
      • Required: yes
      • Type:
        • string
        • null
      • Example: You're everyone's problem. That's because every time you go up in the air, you're unsafe. I don't like you because you're dangerous.
    • facebook_id: The user's Facebook id.
      • Required: no
      • Type:
        • string
        • null
      • Example: iceman
    • twitter_username: The user's Twitter username.
      • Required: no
      • Type:
        • string
        • null
      • Example: iceman
    • hometown: The user's hometown.
      • Required: yes
      • Type: string
      • Example: Los Angeles, CA
    • followers_count: The count of accounts that follow this user.
      • Required: yes
      • Type: integer
      • Example: 42
    • following_count: The count of accounts that this user is following.
      • Required: yes
      • Type: integer
      • Example: 42
    • lineup_count: The count of upcoming shows in this user's lineup.
      • Required: yes
      • Type: integer
      • Example: 42
    • shows_count: The count of upcoming shows favorited by the user.
      • Required: yes
      • Type: integer
      • Example: 42
    • profile_type: The type of the account. Options 'user', 'band'
      • Required: yes
      • Type: string
      • Example: user
    • follows_you: Indicates whether or not the user follows the requesting account.
      • Required: yes
      • Type: boolean
      • Example: true
    • you_follow: Indicates whether or not the requesting account follows this user.
      • Required: yes
      • Type: boolean
      • Example: true
    • avatar: ???

      • Required: yes
      • small: The small avatar, to be used in lists. Retina artwork will be provided if the DELI-RETINA header is sent.
        • Required: yes
        • Type: string
        • Format: uri
        • Example: http://assets1.deliradio.com/assets/avatar_small.jpg
      • large: The large avatar, to be used in lists. Retina artwork will be provided if the DELI-RETINA header is sent.
        • Required: yes
        • Type: string
        • Format: uri
        • Example: http://assets1.deliradio.com/assets/avatar_large.jpg

Response Codes

Successful Response Codes

  • 200: Indicates successful authentication.

Failure Response Codes

  • 500: Indicates unsuccessful authentication.