I am a newbie who is trying to create a Facebook app using PHP and Facebook's PHP SDK. The app is hosted on Heroku, and the sample app that they provided is working fine. However, I am now trying to get the sample app to work on Apache 2.2, and I have encountered a lot of problems along the way. Well, straight to the point, my latest problem will be trying to do Facebook login on localhost, but the 'An error occurred. Please try later' appears on the popup dialog. This does not happen on Heroku.
Will someone please enlighten me on if there's any steps that I can take to overcome this error? I don't think it got to do with any coding error since I am just following the provided sample app. Thanks!
This is happening because FB does not recognize the URL of the host issuing requests. You need to determine what the FQDN of your localhost server is then add it to the Site URL section of the FB App Settings manager. Chances are you have the URL of your Heroku server in there now.
its simple. in local host you must create another sample application for localhost in facebook .and you must have the permission.then you can login and work with your local one.
simply for every copies of your app.you must create it in facebook
hope it help you
good luck
Related
I am a newbie in php, but I am a long time coder. I am trying to get the google drive api for php working with the example files provided, but I am getting a redirect error with the following information in the message:
redirect_uri=http://jppp.com:8080/interface/googletest/simplefileupload.php
In every answer I have seen the problem is that the redirect uri in the code does not mach that on the google console, but in my case they appear identical. Here is the line of code (from the example) I cant use localhost because the lamp server is hosted on docker, and google won't let you use an IP address for the uri. I ended up changing my hosts file for jppp.com to the docker container.
$redirect_uri = 'http://jppp.com:8080/interface/googletest/simplefileupload.php';
and here is the relevant section of my google console api credentials. I have also waited more than half an hour in case google was slow in updating and tried it in a different browser.
picture of google api credential screen
Can anyone see a difference between the code and the console? What else can I try to get this working?
Thanks,
Derek
Apart from having this URL added as an allowed redirect_uri, you need to configure the domain itself in the Google Console.
When you add it & verify ownership, then you can play with it. The section can be found here:
https://console.developers.google.com/apis/credentials/domainverification
I'm running wordpress with XAMPP using the "Social" plugin. When trying to log into facebook/twitter from within the admin menu I get
POST to http://127.0.0.1/wordpress/index.php?social_controller=auth&social_action=authorized&salt=a3abbd88f12bd9f7d08e1b6c6c0e2d44&is_admin=true&user_id=1 failed with 404
I've been searching the web for hours trying to find a solution to this, any help would be much appreciated!
Please test this on live server.
Social plugin functionality is not working properly on localhost or local system, you have to test on live server to be confirmed working
From reading between the lines on MailChimp's fora; the company does not, and apparently never will, allow API calls or endpoint submissions from localhost.
I'm having a little problem with the whole Facebook app development.
I created an facebook application and gave it an IP for my server.
I set my .php script file on the server and set the secret key and appId.
When I click on the app on my Facebook account to reach it, I get an "Uploading (0%)" text on the bottom of the browser and eventually I get a message:
"This webpage is not available".
When I used the "Heroku" hosting service, I got an app.
I think the problem is the communication between Facebook and my server but I don't know what.
I tried almost everything.
Can somebody help me?
If you issue a request to your application from the linter tool?
http://developers.facebook.com/tools/debug
If you run your own application url through there and don't see any activity then Facebook just cant access your server and you need to do some work with your firewall.
I'm trying to use the php shopify api library created by
cmcdonaldca at https://github.com/cmcdonaldca/ohShopify.php and
I am getting this error:
The redirect_uri and application url must have matching hosts
This occurs after I type in the shop name of [myshopname].myshopify.com and
the error appears on a page with this url:
https://[myshopname].myshopify.com/admin/oauth/authorize?client_id=[myclientid]&scope=Customer&redirect_uri=http%3A%2F%2Flocalhost%2Ftest%2FshopifyAPITest2.php
I'm doing this development locally so my host is localhost, is that really
the issue? The first time I tried entering a shop name I got to the
shopify page asking me to login, but then when I tried it again later it is
giving me the error. Is there some session variable that was set initially
that is causing the error? It doesn't look like it based on the error, but
that's what the behavior suggests.
Please help me understand how to address this issue. If it really means
the api script needs to be hosted at myshopify.com (the host for
[myshopname].myshopify.com) how would I put a php script there?
Thank you
The error you're receiving is telling you that the domain of the application URL you entered for the app in the Partners dashboard differs from the one you're providing with your OAuth request.
Make sure it's listed as localhost and the error should go away.
Also, make sure you have set your API key and shared secret correctly in config/application.rb
I'm trying to run the example.php file that comes with the facebook sdk. I do have a hosting server that runs php, and also changed the ID's to the corresponding one on my app. Here is the message i'm getting:
This webpage is not available
The webpage at https://filipeximenes.com/facebook/ might be temporarily down or it may have moved permanently to a new web address.
Error 501 (net::ERR_INSECURE_RESPONSE): Unknown error.
i'm pointing the canvas to this adress: http://filipeximenes.com/facebook/
Thanks.
Based on your description, I think that this is your problem:
Do you have a valid security certificate on the hosting server? I ran into that problem recently when deploying an FB app. Since October, you have to have a valid cert even in sandbox mode for the FB app to run properly. If you don't have one it causes weird problems.
Just a thought that I hope helps.
One other thing to do from a debugging perspective is to take a look at the actual app running on your hosting server without viewing it via FB. If you get the same error message there, you know that it has nothing to do with the FB SDK.
Thanks!
Matt