残念ながら、私はこのエラーを受け取り続けます:
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
ログインは機能しますが、/etc/hosts
ファイルが:127.0.0.1 [mysite].rhcloud.com
に設定されている場合、実際の を表示したときにのみ失敗します[mysite].rhcloud.com
。
rhcloud で実行しているものとまったく同じアプリケーションを (別のサーバーで) ローカルで実行しています。具体的には、ローカル <-> リモート Web アプリケーション ディレクトリが同期されます。
URL情報
リモートでログインしようとすると、URL は次のようになります。前述のエラーで失敗します:
https://graph.facebook.com/oauth/authorize?scope=user_photos%2Cfriends_photos&redirect_uri=http%3A%2F%2F[mypublicipaddress]%2Fuser%2Flogin&response_type=code&client_id=[非表示]
ローカルでログインしようとすると、URL は次のようになります。そして動作します:
https://www.facebook.com/dialog/permissions.request?app_id=[非表示]&display=page&next=http%3A%2F%2F[非表示].rhcloud.com%2Fuser%2Flogin&response_type=code&perms=user_photos%2Cfriends_photos&fbconnect= 1