Website FB login redirects to blank page - javascript

I'm getting a blank permissions page on facebook login using the Javascript SDK. It was working for the last few days and I'm not sure what I changed. I don't seem to be using my app secret anywhere (I do define the API key). Are there any suggestions for troubleshooting? The Facebook debug page unfortunately just had me add some meta tags related to open graph which didn't change anything. I've tried looking at the 100s of other questions like this but can't figure it out. I tried reverting to an older version of my code so I'm pretty sure it's something with the Facebook, but it was working.
The blank page is in the popup window and has something about permissions in the URL. My site doesn't require any permissions though.
This is the URL in the login window after signing in:
https://www.facebook.com/dialog/permissions.request?_path=permissions.request&app_id=number_I_removed&redirect_uri=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D11%23cb%3Df8917d1784b726%26origin%3Dhttp%253A%252F%252Fpostacle.com%252Ffd565a0d8d775e%26domain%3Dpostacle.com%26relation%3Dopener%26frame%3Df12565ffe5570f2&sdk=joey&display=popup&response_type=token%2Csigned_request&domain=postacle.com&fbconnect=1&from_login=1&client_id=number_I_removed
If I reload my page I'm signed in correctly. The app ID and Client ID are the same in the URL. Not sure if they should be but wasn't specified a client ID or means of generating one.

OK, so of course I left out a critical detail: I'm using Django. Further, I'm so reliant on Django I was serving my Facebook channelUrl in a view. Facebook's API didn't like that. After reading the story of a similarly cursed fellow, I changed my ways: URL links directly to channel.html file. No more sorrows.

Related

HTML5 History API not working after refreshing the URL

I'm building very simple SPA 'wannabe' site /for a friend and for exercise/. The idea is simple - 3 static pages: home, portfolio, contact. I've made the links from the portfolio and contact to change the url and I just need to make some functions to change the content. So far so good, but when I refresh the page when I'm on /contact or /portfolio "page" i get error "Cannot GET /portfolio". Same happens when I try to copy and paste the link in other browser. The purpose of the site is to be able to send links and open em. Could this be achieved without server-side?
No.
You must change have a server-side, because this mode requires URL rewriting. You have to rewrite all your requests to the index of your app.
You can disable HTML5 location mode (and use hash instead).

Issue with editing of Path authentication page

So I have next issue. My app export some images to Path(some social network, as I think), and I use Amazon appstore for sharing my app. But the authentication page of Path, which I fetch in webview has a link to Apple Store and Google Play Market, that's very bad, because of amazon policy disallows such links and I can't publish my app. Here is example of such authentication page - https://partner.path.com/oauth2/authenticate?response_type=code&client_id=1b81bf92642176a90222d90c5ca5c2c6937f4dd7.
First of all, I tried to find some way to edit downloaded page - use javascript to get code of page, delete a link and fetch it back to webview. But after such manipulations webview stop to respond on clicks and I can't log in. I done smth like in this post - Is it possible to get the HTML code from WebView.
So I ask your help guys in next issue - I need working variant of authentication page of Path without any links to any markets.
everybody! It's not possible to edit the page in way it will working correctly after it. So I was forced to delete this function from my app.
Also I have written an email to Path team - they just answered that they don't going to change their authentication page in near future.

Facebook sharer and prerender.io (in an angularjs app)

I've just setup prerender.io middlewave into my tomcat server (running some java webservices and an angularjs app).
The service (prerender) works as it should and I can see the pages adding to the list (also when I send a request simulation the user agent).
My problem is with the Facebook share button (from addthis).
Basically if I visit a not yet cached page and click the "Share on Facebook" button, it will show me the angularjs template and not the "rendered" one.
The strange thing is that I then can see the page on Prerender.io admin.
It's like it's too slow and it times out. Still I don't know how it get the non-cached version of the page.
After the first wrong call Facebook caches the page so if I don't manually refresh it from the Facebook Object Debugger (https://developers.facebook.com/tools/debug/og/object) the wrong page will stay cached on FB servers until the FB cache is refreshed.
Anyway has any suggestion on how to fix this?
I could pre-cache every page but I will have to deal with new pages and I don't think it's a nice solution.
thanks,
Dem
I have the same issue and it still bothers me a lot.
What you can do is after you create your page (typically your user save something), then you can create a server call to prerender to recache your page. After some time (for example 1 min) you can invoke an another call to facebook to refresh its cache...
The only issue with this, it works only after couple of minutes... :(

App id for facebook like button for a page?

I can't be signed out if I want to get a like button for a facebook page. Yet, if I sign in, generated code adds an "appid". It shows me a list of facebook apps but there's no choice for making a button NOT for one of those apps. I just want a button for a regular facebook company page.
Is this something new or a weird bug?
Using the code that this gives me, then throws a warning in console:
"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
This seems to imply that I need to make an app just to use a like button, which makes no sense.
There is no alternative. You have to create a new app for this purpose. Or using app id of any of the existing app on that page will also work fine. Anyways all the apps on the page shares same page like.

how to navigate user from my facebook application's canvas page to my web page?

I am working on a rails application. I have implemented facebook integration in my application. User can invite his friends to my application. Invitation system is working fine but problem is when any friend of user clicks on request it gets redirected to my facebook applications canvas page. I want that the user be redirected to my web applications landing page instead of in the application's canvas page. I tried to do so by including javascript in page which opens in canvas on facebook.
<script>
window.location.href = "http://www.google.com";
</script>
But it is giving me error as following.
Refused to display document because display forbidden by X-Frame-Options.
How to redirect user to my applications landing page as soon as it land son my canvas page? I want to achieve something similar to pinterest does.
Any help is highly appreciated.Thank you
Your frame doesn't have access to the window object, as that'd let you access Facebook's pages and do nasty stuff to them. You need to do top.location.href instead of window.location.href.
Your facebook application is probably sending the X-Frame headers, preventing Facebook to include your application iside the iFrame in the first place.
Some applications include that to prevent clickjacking, see here for an explanation of how it works:
http://blog.mozilla.com/security/2010/09/08/x-frame-options/
You might want to disable that header and then try again.

Categories

Resources