OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Facebook graph how to set parameters for picture?

  • Thread starter Thread starter Emilis
  • Start date Start date
E

Emilis

Guest
I want to get user picture URL, but instead i get image download. In facebook developer guide It says to set redirect parameter to 0 but i don't know how to set parameters in graph, i tried it in JavaScript to but i still get picture downloaded not the URL any example, how to set parameters?

Here is what i tried:

Code:
/me?fields=id,name,picture?redirect=0

It returns syntax error.

The simple request returns image download

Code:
me?fields=id,name,picture

This is the example result:

Code:
"picture": {
    "data": {
      "height": 50,
      "is_silhouette": false,
      "url": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=3008732859171455&height=50&width=50&ext=1587125741&hash=AeSgpchLcdbLL1Mt",
      "width": 50
    }
  }
<p>I want to get user picture URL, but instead i get image download. In facebook developer guide It says to set redirect parameter to 0 but i don't know how to set parameters in graph, i tried it in JavaScript to but i still get picture downloaded not the URL any example, how to set parameters?</p>

<p>Here is what i tried:</p>

<pre><code>/me?fields=id,name,picture?redirect=0
</code></pre>

<p>It returns syntax error.</p>

<p>The simple request returns image download</p>

<pre><code>me?fields=id,name,picture
</code></pre>

<p>This is the example result:</p>

<pre><code>"picture": {
"data": {
"height": 50,
"is_silhouette": false,
"url": "https://platform-lookaside.fbsbx.co...width=50&ext=1587125741&hash=AeSgpchLcdbLL1Mt",
"width": 50
}
}
</code></pre>
Continue reading...
 

Latest posts

Top