Facebook login window for Desktop application - facebook

I'm working on a desktop facebook application,
to show facebook login window
FB = window.runtime.com.facebook;
fb = new FB.Facebook();
sessionHelper = new FB.utils.DesktopSessionHelper(api_key)
The facebook login window doesn't show the full page height, and there's no scroll.
Also, any clue why the sessionHelper.logout(); doesn't take effect except when user restart the application?

Related

Flutter : Crhome view is not clear

I have an app with flutter using facebook auth, when I click facebook login chrome app display with facebook page to login, but the page is not clear like this paic, when I try to use it the emulator not response:
Any one have an Idea tosolve this, I have chnged High Dpi settings and nothing change.

facebook login blank page

I use parse sdk and want to implement FB login but when I hit the button to login a popup open and if I didn't login in fb before it ask me for credential after that a blank page will show with this address
https://www.facebook.com/dialog/oauth?app_id=%7Bappid%7D&client_id{client id}&display=popup&domain={domain}&e2e=%7B%7D&locale=en_US&origin=1&redirect_uri=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D29%23cb%3Df2356881fe8e6bc%26domain%3D{domain}%26origin%3Dhttp%253A%252F%252F{domain}%252Ff1d6980bbb127d2%26relation%3Dopener%26frame%3Df17ee4a3b5fd2e8&response_type=token%2Csigned_request&scope=email%2Cpublish_stream&sdk=joey
And it didnt auto close and redirect to my webpage.
At this blank page popup, view source and see some js: var message = "cb=f1a6be948fefda&domain={domain}&origin=http\u00253A\u00252F\u00252Fjebsenwine.dev.cleargo.com\u00252Ffe2018a8b499c4&relation=opener&frame=f7e1c0c9232fd2&access_token={access token}&base_domain=", origin = "http://{domain}", domain = "{domain}"; document.domain='facebook.com';(function(){var a=window.opener||window.parent,b='fb_xdm_frame_'+location.protocol.replace(':','');function c(){try{a.frames[b].proxyMessage(message,origin);}catch(e){setTimeout(c,100);}}function d(){_fbNative.postMessage(message,origin);}if(window==top&&/FBAN/\w+;/i.test(navigator.userAgent)){if(window._fbNative&&__fbNative.postMessage){d();}else window.addEventListener('fbNativeReady',d);}else c();})();

Check if Facebook app is in an iframe tab

I need my application to redirect to the site with the iframe tab (https://www.facebook.com/pages/namepage...idapp) when someone enters the app (https://apps.facebook.com/idapp)
How can I check if the app is open in an iframe tab?
The a page parameter in the signed_request will be present when the app is loaded via a page tab app, and won't be present otherwise.
Use this to determine if the app should render as a canvas app or a page tab app
Set up the canvas page URL in your app settings, and when that URL is called „redirect” the user via JavaScript, top.location.href = "//facebook.com/yourpageid/…"

Facebook C# SDK, facebook app on fanpage redirects out of tab after login

I am working with the Facebook c# SDK (5.x). I have an app that runs on the fanpage in a tab. so far so good. when I ask for permissions, and i allow them, the user gets redirected to the app, but outside of the fanpage or tab.
Is there a way to stay inside the fanpage tab ?
What I did to solve this was to set the CancelUrlPath (in case user dont allow permission) and ReturnUrlPath(in case he does) to the page url/page and application url. Both attributes from CanvasAuthorizer object.
var auth = new CanvasAuthorizer();
auth.CancelUrlPath = "PAGEURL";
auth.ReturnUrlPath = "PAGEURL with active TAB";
auth.Authorize();
I guess this the solution for now, since c# sdk dont have a nice support for tab applications.
Hope this helps.

Facebook C# SDK for Facebook Connect

How can I use Facebook C# SDK for facebook connect using ASP.NET?
What I am trying to do is:
Provide a "Login with Facebook" button.
Once the user clicks on Login button, get the access token on server side and sign in to my website.
Most articles (I found through google or SO) said use Facebook Javascript SDK for Log in and Authentication and then get the Access token from cookies created on web browser.
What I did so far:
Used Facebook login button in .aspx page with the below code.
<fb:login-button onlogin="window.location.reload();" perms="offline_access">Login with Facebook</fb:login-button>
Problems I am having:
When I click log in button on MY PAGE a window will pop up to log in to facebook. MY PAGE is supposed to reload when I login to facebook but it reloads even I click on Cancel button or close the pop up window. What I need is reloading MY PAGE only when I log in.
From the above step: If I log in and MY PAGE reloads perfectly. In code behind (Page load event) I can see the cookie created and it has the information (access token) what I needed. And from here I want to use Facebook C# SDK to get user information. how to do ?
I used Facebook C# SDK 3 months ago for developing a canvas application in Facebook. The documentation and examples listed on Codeplex are for Apps on Facebook (correct me if I missed to see facebook connect examples). Also, there was a link to documentation which lists all the Facebook C# SDK classes but I could not see that now. Please provide me the link if you know.
Any help will be greatly appreciated.
Thank you.
http://blog.prabir.me/post/Facebook-CSharp-SDK-Writing-your-First-Facebook-Application-v6.aspx
But there is one issue I am not using
parameters.response_type = "token";
Instead of that i have function to update Token
public static void UpdateToken()
{
var fb = new FacebookClient();
dynamic result = fb.Get("oauth/access_token", new
{
client_id = AppId,
client_secret = AppSecret,
redirect_uri = Url,
code = FacebookUtils.FacebookData.Code
});
FacebookData.AccessToken = result.access_token;
}