Facebook [function.file-get-contents]: failed to open - facebook

I am geting function.file-get-contents failed to open when i try to connect with server , my server fails to connect ,same application work in all server but in my server i am getting this error , Any solution , is that server CONFIG Issue ..
YOU CAN CHECK SERVER Config here http://gomandi.com/phpinfo.php

In the last few days I saw a few complaints about file_get_contents not working well when trying to access facebook api using it.
Take a look at these threads:
Getting 404 Error from Facebook Graph API
Facebook Auth with high traffic sites: empty access tokens, empty /me
Facebook API 400 Bad Request
You might find out what's wrong there. I suggest that you try to use something other than file_get_contents, such as curl, which was suggested in those threads as well (along side some code snippets)

Related

Stitch Facebook authentication returns "AuthError"

Using the Stitch Facebook authentication provider with the Web/JS SDK the auth flow seems to work fine up until the redirect is done back to the Stitch servers.
loginFB() {
const credentialFB = new FacebookRedirectCredential();
this.$stitch.auth.loginWithRedirect(credentialFB);
}
It then returns this error from the Stitch service:
https://eu-west-1.aws.stitch.mongodb.com/api/client/v2.0/auth/callback?code=AQClGc41QMShUyLT0FOIyGM4ZEi8FPEj4qSHF022F6gGqdIYrgBmop7QVWVuKQYH-CNCtGNSpOWJSVu9_nZwrHauMVrKt6CeswVIgRs5iQpt84YPFkg35BXZHf_PGcpvTsTBt2HC4B_yyYCcYCc4Ccn_wlCkG9bu-LwfKOePDtTYOJahys-xflBC8IyveMZIAK9lc00orXqC7zooETDgrE8KdoDw6uE8Q8zT_XMD7fGmCB7_-kcnmE9wScgC2Vsb38_AG4dkazNG_IenKpbo0s7vfDDfRLPawXpeWpSue_PRYLGSoKUB1UyWSNiujuq3ClE&state=nBspwBNKIdbEUxcyFdrHDudGKbuJhfjVTcHpzyMjSi-uImn5LQG3XtsgqRUGsB_UIEVnAIi6dswt5FwV90kphQ%3D%3D#=
error: "error exchanging access code with OAuth2 provider"
error_code: "AuthError"
link: "https://stitch.mongodb.com/groups/5ded6422f2a30b6096c347b8/apps/5dfdd120fab085de276dacb2/logs?co_id=5e176295f9d51cd518d60dc6"
Following the link in the error message we arrive at the Stitch logs which says the same thing.
I have followed the official docs (Google Auth works wonders, no worries there) for setting it up and tested the following:
Modified Redirect URIs, tested on hosted (https / http) and localhost.
Configured a Test App in Facebook dev
Tested the various settings for the auth in Facebook console.
Enable forced Re-auth in Facebook, I must then provide password and once that completes same error.
Trying to find information on this error in the official docs or here on Stackoverflow has yielded no results unfortunately. Could someone help explain how to get around this error?
Docs:
https://docs.mongodb.com/stitch/authentication/facebook/
https://docs.mongodb.com/stitch/tutorials/guides/todo-guide-facebook/
The error shown was due to a faulty app secret in the Auth provider section in Stitch. Once that was mended to a correct secret from the Facebook App the login worked as intended. This error should be mentioned somewhere in stitch docs but does not to be documented there at the time of writing this.

Trying to use skype interviews api, but not working & hitting an error as 502

While running curl to make http post request to skype interviews api, it is hitting an error as 502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the conerror in command linetent server.
I am running a command as "curl http://interviews.skype.com/api/interviews -H 'skype-apikey: my api key' -d {}".
By searching, many suggested to check that both IIS versions must be matched, and increase the ARR timeout to 60/120 secs in IIS. Both are not working for this.
Can anyone help me out in using the skype interviews api for performing internal communication like text/audio/video chat, sharing files/screen by any text or video tutorial. Help will be appreciated. Thanx in advance.
Step 1: I have implemented skype interviews API in NodeJs.
First Get your API key and secret:
Step 2: After that create API_KEY and API_SECRET environment variables in the .env file and assign values to them which we got from step 1.
Step 3: Follow the following link for source code to hit skype interviews API endpoint
https://gist.github.com/RajuS1ngh/8729fd8f047a20eed0fe1271c982d122

AEM login with facebook not working

On AEM 6.1 instance I am trying to login using facebook.
Facebook login page opens up successfully. However when I key in any facebook credentials it gives me an authentication failed message and the url is appended with http://localhost:4503/ etc/cloudservices/facebookconnect/PROD_Facebook_APP.login.html//callback/j_security_check?code=AQAIAv.....(mix of alphabets and numbers).
This was working earlier. I dont see any error mesage on the logs and on developer tools
Failed to load resource: the server responded with a status of 403 (Forbidden).
Any help on this would be greatly appreciated.
Regards.

Facebook Real-time Updates: (#2200) callback verification failed, code 2200

I am trying to get realtime updates from facebook for my application as documented in https://developers.facebook.com/docs/reference/api/realtime/. I am struggling now when it comes back to the Subscription Verification. I have set up a callback server which accepts both GET and POST requests. I verified that the server works by making curl requests to it.
However, I stil get this error when attempting to create a subscription issuing the POSt request below
{"error":{"message":"(#2200) callback verification failed:
","type":"OAuthException","code":2200}
From what I read in the documentation and other threads, I assume that this means that the single GET request to my callback URL fails. The callback url does not get requested by neither GET nor POST requests indeed. I suppose that facebook is somehow blocked from accessing the endpoint. However, I am able to auth as a user using the auth dialog (https://developers.facebook.com/docs/reference/dialogs/oauth/) where I pass a callback url on the same server as well. The server runs http (for now).
This is the curl I am using to post the subscription. Host file has an entry to redirect dev.minggler.com to localhost =>( 127.0.0.1 dev.minggler.com)
curl -XPOST 'https://graph.facebook.com/256139341164822/subscriptions?callback_url=http%3A%2F%2Fdev.minggler.com%3A3000%2Ffacebook%2Frealtimeupdates&object=user&fields=friends&verify_token=abcd123&access_token=$MYTOKEN'
Can anybody help me out on this?
finally found the problem. the server wasn't reachable from outside. resolving it solved the problem

Facebook error code 191

I've scoured SO and googed all over the place, and I'm still stuck. I feel a little ridiculous, but I've been banging my head against this wall for a few hours.
Here are my FB app settings:
App Domain: name.local
Site URL: http://name.local:4000
I'm running a local web server and have a web application up and running.
Authentication works (which seems odd because my redirect_url is the same in both the authentication URL and the dialog/feed URL)
name.local is in my /etc/hosts file and points to 127.0.0.1.
I'm running on port 4000.
This URL doesn't work:
https://www.facebook.com/dialog/feed?client_id=nnnnnn&redirect_uri=http%3A%2F%2Fname.local%3A4000&name=aname&caption=acaption&description=descr&show_error=true
I get this error message:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
I'm using test users (created using the FB test user API).
I've checked that my Site URL and redirect URL are in unison about a million times.
Any idea what I'm doing wrong?
Site url and app url must be shame .
app url should not contain protocol information .
site url should contain protocol
I love computers, they do exactly what you tell them to :)
I had to use app_id instead of client_id (that's what I get for copying and pasting from my authorization code).