I use ASP .NET and Facebook Connect APIs. but when I run the app and press Connect button it's return to the Website not to the test local server which is (http://localhost:xxxx/test.aspx) So how I can test Facebook locally (i.e How I can change the callback url) ?
You need to register as facebook developer and create you app there. Once you have your web app registered you can go to your app and click on add product. Add Facebook Login. Then enable Web OAuth Login and add your localhost in the textfield below and save, you should be able to access it.
Creating Test Users You can create test users in the App Dashboard by going to the Test Users section in the Roles > Test Users panel and clicking the Create test users button. This will open a dialog that allows you create up to 4 test users at once.
If you use the Facebook SDK or a Mobile Measurement Partner to send app events to Meta, or the Meta Pixel to send web browser events, you can use the Test Events tool to: Check that you've set up your app and web browser events correctly and we've received them. Debug any unusual activity.
It's simple enough when you find out.
Open /etc/hosts
(unix) or C:\WINDOWS\system32\drivers\etc\hosts
.
If your domain is foo.com, then add this line:
127.0.0.1 local.foo.com
When you are testing, open local.foo.com
in your browser and it should work.
Edit your app at www.facebook.com/developers/ and set the "Site URL" to "http://localhost/myapppath".
When done - change it back.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With