Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Did you ask for the <a href="http://developers.facebook.com/docs/authentication/permissions/" rel="nofollow">read_stream permission</a> during authentication?</p> <p>What type of <a href="http://developers.facebook.com/docs/authentication/" rel="nofollow">Authentication</a> / "Allow" process did you go through?</p> <p>JavaScript SDK? Facebook PHP SDK? XFBML Login Button?</p> <p><strong>EDIT</strong>- Here are helpful link that will get you started up:</p> <p><a href="https://github.com/facebook/php-sdk" rel="nofollow">Facebook PHP SDK</a></p> <p><a href="http://developers.facebook.com/docs/authentication/" rel="nofollow">Authentication Process</a></p> <p><a href="http://developers.facebook.com/docs/guides/canvas/" rel="nofollow">Building Apps on Facebook.com</a></p> <p>These are all official docs in Facebook and github.</p> <hr> <p><strong>EDIT</strong>: Follow this step by step:</p> <p>From your original code, look for:</p> <pre><code>$loginUrl = $facebook-&gt;getLoginUrl(); </code></pre> <p>Change it to:</p> <pre><code>$loginUrl = $facebook-&gt;getLoginUrl(array('req_perms'=&gt;'read_stream')); </code></pre> <p>Uninstall your application first from your account:</p> <pre><code>http://www.facebook.com/settings/?tab=applications </code></pre> <p>Then try it again to show new <strong>Allow</strong> pop-up</p> <hr> <p><strong>EDIT</strong>:</p> <p>It's also about the arrangement of code in the if statements. Use this code:</p> <pre><code>&lt;?php require_once 'src/facebook.php'; $session = $facebook-&gt;getSession(); $fbme = null; if($session){ $fbme = $facebook-&gt;api('/me'); $friends = $facebook-&gt;api('/me/friends'); $feeds = $facebook-&gt;api('/me/feed'); $logoutUrl = $facebook-&gt;getLogoutUrl(); echo '&lt;a href="'.$logoutUrl.'"&gt;Logout&lt;/a&gt;'; echo "&lt;pre&gt;".print_r($feeds,TRUE)."&lt;/pre&gt;"; }else{ $loginUrl = $facebook-&gt;getLoginUrl(array('req_perms'=&gt;'read_stream','canvas'=&gt;1,'fbconnect'=&gt;0)); echo '&lt;script&gt; top.location.href="'.$loginUrl.'"; &lt;/script&gt;&gt;'; } </code></pre> <p>Uninstall your app again from </p> <pre><code>http://www.facebook.com/settings/?tab=applications </code></pre> <p>and re-open the application</p>
    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.
 

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