I am using Facebook Graph using RestFB. When I am trying to post a URL to Facebook -
http://localhost:8080/demo
I even tried
http://www.wannaget.com/home
This is also not working. Issue was not local or live url. Because this was working previously But now it gives me invalid URL error.
It gives Following response
INFO: Facebook responded with HTTP status code 400 and response body: {"error":{"message":"(#1500) The url you supplied is invalid","type":"OAuthException","code":1500}}
I don't understand the reason why this is happening. Everything is working fine but now I am facing this issue.
The url is not in a valid format. I guess it has to end with an extension, like "http://localhost:8080/demo.html"
A workaround that worked for me (on rails):
I was trying to post on fb the link "localhost:3000/articles/53" with that same error. To fix it I had the route:
match 'news/article/:id/x.x' => 'articles#show'
and post successfully on fb the resultant link "localhost:3000/articles/53/x.x"
Any real solution is welcome!
The URL you provided is a for a local server running on your machine. Facebook has to be able to access that URL but it can't because it is not on the Internet - it is only accessible from your local computer.
You'll have to give Facebook a real URL that is accessible by their servers...
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