Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook API: IP Address blocking of Heroku servers
    primarykey
    data
    text
    <p>I keep having the following error in my Heroku PHP facebook app logs:</p> <pre><code>[app web.20] PHP Fatal error: Uncaught OAuthException: (#5) Unauthorized source IP address\n thrown in /app/www/sdk/src/base_facebook.php on line 1238 </code></pre> <p>I also noticed that the same servers keep producing this error until I recycle the processes (ie in the case above it would be <strong>web.20</strong> and <strong>web.6</strong> that keep failing repeatedly), but after <code>heroku ps:restart</code> it would be different servers that keep failing.</p> <p>Now after doing some research I noticed that people kept advising I whitelist my server IP in the Facebook App -> Advanced Settings page, meaning that Facebook keeps a list of blacklisted IPs and this is where you can allow access to them one by one.. which had me wondering why Facebook clearly <a href="https://developers.facebook.com/blog/post/558/" rel="noreferrer">encourages its users to use Heroku for its facebook apps</a>, while at the same time black-listing its servers.</p> <p>So basically:</p> <ol> <li>Heroku is Facebook's hosting partner</li> <li>Heroku provides its users with unpredictable IP addresses every time the app is recycled</li> <li>And Facebook has blacklisted many of Heroku's servers (around 1 in 10 by my count) </li> <li>So you can never be guaranteed you app is going to get access to its API for all your requests</li> </ol> <p>My question is:</p> <p>How are developers like me expected to configure production-ready apps in a Facebook-sponsored Heroku environment that clearly is bound to fail around a good chunk of API requests?</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.
 

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