Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/dd573303%28v=vs.85%29.aspx#api_docs" rel="nofollow">AJAX - Introducing Cross-domain Request (XDR)</a></li> <li><a href="http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx" rel="nofollow">XDomainRequest - Restrictions, Limitations and Workarounds</a></li> </ul> </blockquote> <hr> <blockquote> <ul> <li><strong>NOTE:</strong> this answer both your questions and peraph someone should close at least one of them</li> </ul> </blockquote> <p>so my solution to this problem is simple; you still continue to use AJAX to perform the request to facebook but not directly.</p> <p>so your code will look something like this:</p> <pre><code> $(function() { $.ajax({ url : 'ajax-handler.php', data : 'action=get_access_token', type : 'GET', dataType : 'json', success : function(json) { } }); }); </code></pre> <p>then on the <code>ajax-handler.php</code> file you will put all the stuff needed to retrieve the <code>access_token</code> and other information.</p> <p>a server-side pseudo code (i'm using php here) will look something like this, but you need to use the php sdk for a better coding... </p> <pre><code>&lt;?php $action = $_GET['action']; if (isset($action)) { switch($action) { case 'get_access_token' : $query = array('client_id' =&gt; '####', 'client_secret' =&gt; '####', 'grant_type' =&gt; 'client_credentials'); $access_token = file_get_contents('https://graph.facebook.com/oauth/access_token?' . http_build_query($query)); //$access_token will be like access_token=asdas8dd98sada... //but we don't use it here... $app = file_get_contents('https://graph.facebook.com/######'); echo $app; break; } } ?&gt; </code></pre> <p>and this is the result:</p> <blockquote> <ul> <li><strong>demo</strong>: <a href="http://bit.ly/JO59mO" rel="nofollow">http://bit.ly/JO59mO</a></li> </ul> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload