This is the weirdest thing. I have very simple CF code that looks at cgi.HTTP_REFERER. Simply, it looks at referrer. It the link was clicked from outside our main website domain, it displays something. Otherwise, nothing happens. So, if someone clicks a link from FB and it goes to our website, it displays something. If someone clicked the link from our homepage on our website, it does nothing.
There is a specific link that when clicked from our homepage, the "does something" happens. I wrote out all the variables and the http_referrer shows https://m.facebook.com. I wasn't on Facebook when I clicked the link. I wasn't on mobile. I was on my main website homepage when I clicked the link.
Now, here's the only things I can imagine:
We have facebook commenting on that story page.
that URL has been shared on Facebook.
But, we share all of our stories on Facebook and they all have FB commenting so I would think if FB stored this information, I would be having this issue on all pages.
Anyone have any idea why this is happening?
As with others, my user_agent, remote_addr and an referer are all incorrect. I also see different remote_addr values depending on which browser I use. So whatever you are dumping, it is not the CGI scope for my request.
I suspect you have a function which handles the dumping of the CGI scope, it's in a CFC that's in a persistent scope and you have an unVARed variable in there somewhere? Or your page-caching (possibly on a front-side proxy?) based on browser, and the dump in the cache?
NB: on Opera and Safari I do not get Facebook as the referer.
Related
I've provided my canvas app with all required for publishing actions to Facebook. After I publish an action I have a message like "John made an action over {SomeObject}" in my timeline. Everything works OK but the {SomeObject} i click opens in a window, not in facebook iframe where my app usually works. The URL of this link is rendered like this:
https://www.facebook.com/connect/uiserver.php?app_id={my_app_id}&method=permissions.request&redirect_uri={my_object_url}&response_type=code&display=page&auth_referral=1&fb_private_mode_enc={some_text_string}
What should i do to make my clicked object open in facebook iframe, not window? Can i somehow change display=page to display=iframe in this URL?
Thanks!
I've been having this problem too - I'd like to be able to direct a user straight to my canvas app. Added to this, unless the meta in {my_object_url}'s HTML lines up with what Facebook expects to see, the link resolves to a "this app is having a problem" dialog.
A possible workaround for you, not so much a 100% answer: allow the redirect, but in the meta of the page being redirected to, do an HTML refresh back to the app canvas? This would redirect users back to the app.
If you needed to direct them to a specific page of the app, you could use an app_data signed request addition to the canvas-redirect URL.
Hope this helps. Not a silver bullet though.
PG
Having some issues with the feed dialog when attempting to post to a event or fan page. In my application I am using the JS API and FB.ui using the method feed.
But for a demonstration you can do it using the feed url too for example:
http://www.facebook.com/dialog/feed?app_id=131727613511269&to=287203454659917&redirect_uri=http://www.timeanddate.com/
After clicking share you get the:
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
Where:
app_id = your app
to = a event / fan page
redirect_uri = a url you are allowed to redirect to
note that the app has publish_stream permissions. (it also has manage_pages for fan pages)
The app in question by the way is: http://apps.facebook.com/tndcountdown/
Thanks,
Andy
EDIT:
An Example taken straight from the documentation:
http://www.facebook.com/dialog/feed?app_id=123050457758183&link=http://developers.facebook.com/docs/reference/dialogs/&picture=http://fbrell.com/f8.jpg&name=Facebook%20Dialogs&caption=Reference%20Documentation&description=Using%20Dialogs%20to%20interact%20with%20users.&message=Facebook%20Dialogs%20are%20so%20easy!&redirect_uri=http://www.example.com/response&to=287203454659917
just replace to=287203454659917 with an event.. (make a test one like it did there)
A few issues I've run into will dialog is that Facebook tries to fill in any missing data. So if you don't provide a description and caption, Facebook will try to scrape the page to get that content. Depending on how the page responds to the "scraping" Facebook will error out. I always make sure I include at least a space for those fields.
It seems the feed url you provided is similar to what is in the documentation. But the demo in the documentation has extra parameters.
I'm about to add page support to my Facebook app, which does the same thing as yours.
http://apps.facebook.com/countdown-timer/
As I posted here - Facebook Send Button - 'Sorry, something went wrong.'...
I had the same problem & worked out that this was due to linking to a Facebook page that did not have a vanity URL set up (i.e. http://www.facebook.com/CubicMushroom rather than http://www.facebook.com/profile.php?id=261963707177053). If you set up a vanity URL for the page it seems to work OK (providing you link to the vanity URL version of the page URL).
To claim a vanity URL, once you have a certain no of like (it used to be 25, but think it's a little lower now) visit https://www.facebook.com/username/
I have a like/send button that I've set up on a customer's home page. I have it pointed at their facebook profile page so that when people like them either from facebook or on their homepage, it's always liking the same thing.
Anyway, I've used the fb social plugins page to create the fbxml, and I'm having a problem with the send button. The like button works wonderfully, but the send button doesn't want to cooperate.
First, I had the button set up using "http://www.facebook.com/AFEDEWA" as the link to like/send. However, with the button(s) configured that way, when you click on Send you get an error message that says "The page at ttp://www.facebook.com/AFEDEWA could not be reached because the server returned status code 200."
So I did some digging on the 'net, and found some info that seemed to indicate that maybe the send button didn't like the alias / page name. I tried putting in the page id instead, and when I do that I get a different error: "The page at ttp://www.facebook.com/profile.php?id=165721903513327 could not be reached."
(I removed the h in the front of the links in those messages because the board was complaining about too many links. But the actual error message has the http in full :) )
The link works either way if you c/p into your browser, and also works fine with the like button. It would appear that the send button has some issues? Maybe needs to handle redirects instead of returning a 200 OK message.... ?
Any thoughts would be greatly appreciated. If you want to see the like/send button in action, this is the website it's set up on: http://www.coolersecurityadvisors.com
thx!
After checking the buttons on the upper right, I found an issue. It seems like you can not Like/Send URL's of real Facebook Pages using the Like/Send button. Facebooks URL debugger always comes up with the error "Facebook can not crawl itself".
If you just want that people share a link to your Facebook Page, simply create a file on your server, implement the OpenGraph Tags you want to show up on Facebook (title, image, etc.) and output this in case the Facebook crawler is visiting this site, if it's not the Facebook crawler, redirect the user to https://www.facebook.com/AFEDEWA
Fix up the 8 warnings from https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.coolersecurityadvisors.com%2F and I think that might help solve the problem.
I have a Canvas application that allows the user to first see what it's all about, and then asks for permissions only if he wishes to perform certain actions.
When the user enters the application it starts without requiring permissions. We provide a "Login" link which will make a request to
https://www.facebook.com/dialog/oauth/authorize?client_id=XXX&redirect_uri=http://myapp.com&scope=publish_stream
This causes the Facebook logo to appear with a link that says "Go To Facebook.com". I understand that there are cross-frame problems that causes this, and can be fixed by simply putting target=_top onto the link (or playing around with Javascript). For now, I want to keep things simple so I don't use this. I do notice that this is in a iframe_canvas which is good, so I click on that link and get to "Request for Permission" which takes over the screen (didn't this use to be a popup?) and the iframe_canvas seems to have gone away, and I now have UIFullPage_Container.
I click Allow and Facebook redirects the browser to
http://myapp.com&code=XXXXXXX
This is bad because my "Canvas" application has broken out of the canvas and taken over the whole browser.
Is there something I'm doing wrong, or is this some type of Facebook bug? Do I simply redirect this back to http://apps.facebook.com/mycanvasapp, and if so is there some way to pass some parms?
Just redirect them to https://apps.facebook.com/yourcanvasapp/whateveryouwant?here=isokay. The part after yourcanvasapp/ is sent to your server. You'll get the signed_request as a post arg, and the other params and path in the query string.
In other words, if your secure canvas URL is https://myapp.com/fbapp/, and you send the user to https://apps.facebook.com/mycanvasapp/foo?bar=baz, Facebook will send a POST to https://myapp.com/fbapp/foo?bar=baz and signed_request in the POST-data.
Maybe I'm missing something here, but how is not using target=_top keeping things simpler? It is actually what Facebook is forcing you to do anyway by displaying the "Go to Facebook.com" link; it's implementing a top-level redirect because it's necessary for it to display the permissions dialog page. So why not just do it yourself and save the user a potentially confusing intermediate step?
As far as getting back into the iframe, it would probably be easier to use apps.facebook.com/yourapp/somepage as your redirect_uri and that way it will go directly back into "app" mode.
I'm trying to add a facebook "like" button to my page, and it is appearing just fine. My problem is that once it is clicked by a user, it says "Like NUMBER" then resets as if the request was canceled or something.
The weird thing is that if I try to like a page using my facebook account it works, but I tried letting a friend like some content and this behavior appeared.
I created a facebook app, specified the site url with a trailing slash, and site domain. I used the app ID with FB.init, and with the open graph tags. I can't figure what I'm doing wrong here. Any help would be appreciated.
Sample page can be found at: http://wiseolive.com/en/doctors/3881-khalid-jamal-salaymeh
First, for the count to work correctly, Facebook needs to have access to the page (in other words a public page). Check your URL in the linter tool (https://developers.facebook.com/tools/debug) to ensure it can been seen by Facebook.
Secondly, ensure your og: tags are correctly setup. Once again, you can use the linter tool to do that.
Facebook like buttons will show this behavior until they have been scraped by Facebook. That scraping (facebook like docs) will occur every 24 hours, when an admin clicks the like button or the url is put in the url debugger/linter. From what I can tell doing that will solve the problem for that specific link, but not any others you may have on your site.
I don't know of a generic solution for dynamically generated pages unfortunately.