Using localhost as Canvas URL doesnt work

668 Views Asked by At

I'm trying to develop a simple desktop application to publish posts on my wall using restfb api for Java. It works fine so far, but other users cant see my posts, only me. After reading some other documentation, I found out that an HTTP request like:

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream,publish_stream

is used to edit the publicity settings of my applications. As I mentioned before, it's a local desktop application without any webserver behind it, so I want to use the localhost as a canvas URL, because its needed in the link above. I simply used http://localhost:8080/ as my site-, canvas- and secure canvas url. After using these informations in the HTTP request above I get the error, that the requested link doesnt work. My posts still can't be read by others.

Do you have any suggestions to solve that problem?

2

There are 2 best solutions below

0
On

Same problem here. A little more to add.

(1) I'm taking ownership of an iOS app that has apparently had this problem (not sure when it started).

(2) When the "app Settings" has been created for the first time (i.e., once permissions were granted and the "app Settings" appear on my Facebook Account Settings -> App Settings page), the App activity privacy field is set to Only Me.

(3) Setting it manually to Friends on my Facebook account still does not allow it to post to anything other than "Only Me".

Update: I got it to work by changing the Default Privacy setting under Privacy Settings of my personal Facebook account - the one to which my app was posting. I had it set to Custom with "Only Me" selected. That would be a good FAQ item for our apps. I guess we can think of that setting as a global override.

0
On

Your local host can only be used inside you machine once you are working with facebook you most provide them a global url.

Try replacing localhost with your ip