Facebook Feed Dialog through WebView in Unity is Blank - facebook

I have been using a WebView dropped into Unity(Found here: https://github.com/gree/unity-webview) for implementing Facebook connection. The WebView has been working very well for authorization of the user in the OAuth dialog, but when I try to access the feed dialog for posting to a friend, I end up with a blank white screen. The same generated URL when dropped into a browser works just fine.
The feed dialog URL I generate looks like this:
http://m.facebook.com/dialog/feed?access_token={Access Token}&app_id={App ID}&from={Authroized User}&to={Selected Friend ID}&link={Post Link}&name={Post Name}&
description={Post Description}&redirect_uri={My Redirect Page.aspx}
Example of the functioning Auth dialog URL I generate looks like this:
http://m.facebook.com/dialog/oauth?client_id={App ID}&redirect_uri={My Auth Redirect.aspx}&scope=publish_stream,publish_actions&response_type=token
Wondering if anyone knows what could be causing this with this particular WebView.
Thanks in advance for any assistance.

Was tearing my hair out about this but got to the bottom of it. I had tried escaping the URL and it did not work the other day - but then I tried escaping just the values of some of the parameters being sent that had spaces this morning. This seemed to fix it. Simple mistake, but if anyone runs into this, don't forget ESCAPING IS EVERYTHING! Often you are working in something higher level(At least I am) where URLs and parameters get escaped automatically, lesson learned I guess :D

Related

Facebook like button redirection?

I tried to install Facebook Like Button (http://developers.facebook.com/docs/reference/plugins/like/) on my page but after I've put the code (HTML5 version) there is some strange redirect which change address of the page adding "_FB_f2af6423b6fd064xd_action=proxy_ready&data" to it?
Do you have any idea what may cause the problem?
I can install iframe version of like box but some time ago I received an information about similar problem while there was some toolbar installed in the web browser. String in url was different but result the same - error 404.
You can see the problem here: www.keeeper.voyagersblog.com/en/ and properly working page (without like button) here: www.bea.trvblog.com/en/ .
Thank you for help!
Best regards,
Bartek
The problem was that I have my own js EventListener called 'message' and it seems that facebook use the same name.
My event listener is fired by fb script and then my function makes redirect (params are not proper so it goes nowewhere).
When I changed listener name it's ok, it seems that it's fb bug.
Thank you anyway!

Open Graph url gets messed up on a users timeline?

When I like an URL on the company website:
http://guidepal.com/escape/10
The link that gets liked into the timeline looks like this:
=">http://guidepal.com/escape/10?fb_action_ids=10151400567746110&fb_action_types=og.likes&fb_source=timeline_og&action_object_map=%7B%2210151400567746110%22%3A10151100366393350%7D&action_type_map=%7B%2210151400567746110%22%3A%22og.likes%22%7D&action_ref_map=%5B%5D&code=AQB2NUbRhNvppL1HOqmJM6CBGQa1N3vUoK9QrPNNm516895czzIFYn93tiT4HWmBcCCrjK8tYvHqUPLAbu4mhk-xT3w17UMeTITQGnJXW3_NuyYc1Aa7FHl0nTwyuYzDS05x761boSwsGNoOpcL-ulsmiiVObacATa2NQEjLtQFrygJ81fHrSyr7pF5WWlPsf9w#=
The URL is there but there seems to be a problem, since it's adding some more stuff (which I really hope is not an access token there somewhere :P).
I'm guessing there is something wrong with the meta tags, but I have no idea what since everything seems to be okay.
Any ideas?
I've actually investigated this a bit further and this actually is because what is happening on the server side. I'm not responsible for the web-page here, but the one who is, explained that there are some bits of code that handles integer at the end of an url, he would not thought it would be a problem.
Weirdly enough it works by pressing the image instead of the URL in the recent activity.
And a hard problem to know when you are not responsible for both.
I've just liked it, and the URL came up correctly on my Timeline.
It also looks like the meta tags are set up correctly - you can check them on the linter tool that Facebook provides

Facebook like is broken, adds a trailing # to the final url

I'm running my site on Cargo Collective and trying to have likes per page. I cannot modify the code in the head tag only within the body tag.
When i debug a page i get the following;
Response Code 206
Fetched URL http://www.iamneuron.com/Break-this
Canonical URL http://www.iamneuron.com/Break-this
URL for Likes http://www.iamneuron.com/#Break-this
Final URL http://www.iamneuron.com/#Break-this
I can't figure this out and i have been searching for a while now. Even if i explicitly specify the url rather than leaving the code to figure it out, facebook still adjusts the url to one that doesn't work with the trailing #.
Originally i was trying to create the like code via facebook but i have now switched to this which works better with cargo but still produces the same error:
http://randomcodescraps.tumblr.com/post/1363402555/js-dynamic-like-button-on-cargo-collective-projects
Anybody any ideas? Thanks in advance btw!
Your page doesn't have any OG tags that Facebook can use. And those that are in your page are commented out. Add proper OG tags and then use the link tool to check you tags and see if still have the same problem.

Endless loop in a Facebook game with Firefox

I have a game in Facebook and suddenly a new problem came out. In Chrome, Safari, Opera and Internet Explorer work fine. In Firefox the Facebook page loads good but when the game iframe starts loading, it gets a points that automatically reload the whole page. I can not understand what's happening. Anyone could know the issue?
You need to either accept third party cookies or locate the one cookie it needs to load (seems to be the developers's own website usually - look into the list of cookies currently stored on your computer in ff options) and whitelist(allow) that.
Since that answer is nowhere on the net and I just spent one hour trying to figure it out to fix the same problem I'm putting it here in the hope it'll help.
Well, it is good know problem for me, about half year ago I got the same also with Firefox. In my app real problem was that, firefox with his AJAX action, lost somewhere access token from parent window/frame...
My advice: try to stick access token to AJAX's request too.
Edit in response to comment:
Unfortunatelly, now I can't see any token in url into my app frame... but what I did then was something like that: (using jQuery):
$.get("http://mydomain/getInfo?id=12345 + '&' + (location.href.split('?'))[1])
where location.href.split('?'))[1] add session/access token to my intern AJAX request.
Anyway, if application works fine few days ago, check official facebook dev forum, there is often some cause on facebook side...

FB.provide is not a function

I'm developing a WordPress plugin to show above or bottom the posts Facebook like and send buttons.
Unfortunately when is also activated a plugin for Facebook share button there is a Javascript error (FB.provide is not a function) and like and send buttons don't appear.
For example this happens in this page: http://www.pasqualepuzio.it/2011/04/plugin-facebook-like-and-send-button/
How can I solve this issue?
Thank you very much
I ´ve faced the same problem and it happens if you add the script twice on the site (http://connect.facebook.net/sv_SE/all.js)
I understood that part that we cant have all.js twice but I want to have Facebook Share Button and Facebook Like Button.
According to Docs, I need to include these two JS Files.
https://connect.facebook.net/en_US/all.js
http://static.ak.fbcdn.net/connect.php/js/FB.Share
Now, If I include both Firebug will give me same error "FB.provide is not a function". If I remove either of them then Like or Share button wont work.
I can do iFrame version but I have HTML Encoding issues with iFrame Version. I am programmatic generating HTML Response.
Any idea, how to approach?
There is a workaround for this: instead of placing the javascript Fb.Share within the same page where you are loading the Javascript SDK, use an Iframe with the first and set it in the second.