Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Send https requests from CloudCode

Discussion in 'Cloud Code' started by Jeryl, Sep 9, 2022.

  1. Jeryl

    Jeryl

    Joined:
    Sep 18, 2015
    Posts:
    45
    Hi,
    I am trying to use Cloud Code to get a long-lived token from Facebook but I am not sure if Unity CloudCode can do that.
    Here is the way that FB suggests from the backend, but I am not sure how to use it.
    Code (JavaScript):
    1. curl -i -X GET "https://graph.facebook.com/{graph-api-version}/oauth/access_token?
    2.    grant_type=fb_exchange_token&        
    3.    client_id={app-id}&
    4.    client_secret={app-secret}&
    5.    fb_exchange_token={your-access-token}"
    Thanks
     
  2. MileyUnity

    MileyUnity

    Joined:
    Jan 3, 2020
    Posts:
    92
    Hi there, currently this is not yet possible as we don't yet allow external HTTP calls. This will be worked on in the coming weeks
     
    DavidZobrist likes this.
  3. Jeryl

    Jeryl

    Joined:
    Sep 18, 2015
    Posts:
    45
    Oh ok. That's to bad, but at least it is on the todo list.
    Thanks for the swift reply ;)
     
    MileyUnity likes this.
  4. Unity-CJ

    Unity-CJ

    Unity Technologies

    Joined:
    Oct 13, 2021
    Posts:
    7