I'm fairly new to Facebook C# SDK, I followed exact same steps mentioned in the tutorial, but it didn't work, always showed "Could not parse facebook oauth url". That's the windows 8 sdk.
I then tried Windowns phone 8 sdk, every time I entered my username and password, a page with black "success" and red "SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone." Here I downloaded the same sample source code and tried, same result.
I even downloaded the sample and ran it, same issue presented.
Does anybody run into this situation? Is it just me or something changed behind the scene?
Specs: windows 8 professional 64-bit, visual studio 2012 ultimate.
Thank you in advance.
Cheers,
Chao
I am really sorry to say I made a stupid mistake here, my Facebook app was in sandbox mode, so the url was only visible to developers and admins, since SDK is accessing the url as a visitor, stupid as me used my other account to access the app, 100% that I would be rejected.
So after I registered myself as a developer, this issue was resolved.
Related
I would like to code for a FacebookLoginDialog.cs programmed in Microsoft Visual Studio 2010 Ultimate in C#. As you may know, Facebook has upgraded its API to v2.2 and most of the information I find online is v2.0 which I am not sure if it is the same.
I tried looking at Facebook v2.0 Login with C# facebook sdk but I could not access the link provided in it and it's v2.0.
And everytime I run my code, I will face this problem when I get to facebook login.
The code is given by my friend but she did it one or two years back before the facebook api upgraded recently. There is no URL (or uri) in my friend's coding. but it works for her previously when she started coding.
I have no access to the app ID site that was created. I have created a new app ID but to no avail.
Please help! I am really in need of help.
Please check the site Url you have mentioned at the Facebook developer section.
I think problem may arise only for two reason
1> Incorrect Url at facebook developer site
2> navigateUrl parameter should be same when you send code for access token.
I've found how to solve this problem. The problem doesn't lies on the coding but the facebook developer site.
https://www.facebook.com/help/community/question/?id=542958419109491
Just enable the "Embedded browser OAuth Login" button and it will work.
i am trying to use my facbook account to login in windows phone 8 application .i need my basic account info like my name email and password etc to proceed in my application . but i could not find a simple solution or any help for this . the solutions i found are too much complex for my understanding if any one give me a link or an anything .
Thanks in advance
You can find a step by step solution in the Windows Phone Dev blog.
Should be as easy as installing the Facebook SDK for .NET from Nuget, setting some stuff on the App.manifest file and initiate the login process:
Facebook.Client.FacebookSessionClient.LoginWithApp()
As eshaham mentioned you should have the Facebook API to integrate with your application. Have a look over here for the steps in detail.
Related post #1
Related post #2
So my problem is the same as the one in these posts, but I have no idea how to implement any of the solutions found in the threads. I'm running FB SDK 4.3.6 with Unity 4.2.0. I'm basically just trying to run the InteractiveConsole Scene with an android phone that has the FB app installed. When trying to login it just throws me back to the console. Without the FB app the login works perfectly.
Now I do know that those solutions work somehow, but where or how in the world should I use them? None of the answers really tell that in a way that an idiot like me could understand. I don't have any experience on Java or Android in itself, so all I can do is Unity and C#. So how would I modify the InteractiveConsole script to make this work?
Ok I got this fixed by printing the keyHash from AndroidFacebook.OnLoginComplete() to a GUIText and the copying it from there to the facebook dev site. All other means gave me an invalid hash. I have no idea why this is the case, but I'm just glad it works.
I am working on an application for Windows Phone 8 and I'd like to give the possibility to the users to login with their Facebook account, so they won't have to create an account on my application.
I saw the Facebook SDK for .NET and decided to use it because it seems to be really efficient and popular.
As a beginner, I followed the tutorial in the doc of the SDK : http://facebooksdk.net/docs/phone/tutorial/
I did the exact same thing that in the tutorial, everything is okay since I login. I click on the login button, I'm redirected to what they call the "FacebookLoginPage" in the tutorial (a .xaml with an empty grid so the webbrowser can fit in it), then appears the webbrowser with the Facebook page where I can type my login and password. After that, I'm redirected to the page that asks for permissions on my Facebook account, I click on OK. Everything is good so far.
And then comes my problem. I should be redirected to what they call the "LandingPage" in the tutorial, but instead of that I'm redirected to the facebook "login_success" (https://www.facebook.com/connect/login_success.html) which displays "Success" and also a security warning, and then nothing happens anymore...
I thought something in my code was not right so I spend a couple of hours working on it, didn't find anything. So I tried to run the sample application that they provide in the doc of the website, I just modified the Facebook AppID in it (I've put mine), and same thing happened.
I also tried other things that I found on the Nokia Developer Wiki, same thing.
So I think something is wrong with my Facebook Application, but I can't find what it is...
Is anybody could give me some help ? I'm dying here :(
I apologize in advance for my english mistakes, and I wish you a good day !
UPDATE : I finally did it following this tutorial http://developer.nokia.com/Community/Wiki/Integrate_Facebook_to_Your_Windows_Phone_Application
The redirect to "https://www.facebook.com/connect/login_success.html" should contain the accessToken as a url parameter, so if you allow navigating to this url it is indeed a security risk as it exposes the AccessToken. You need to listen for the 'Navigating' event from the WebBrowser control and if the browser is navigating to "https://www.facebook.com/connect/login_success.html" then you need to cancel the navigation and get the AccessToken from the url parameter.
UPDATE:
It looks like FB changed their OAuth login response from ...login_success.html#access_token= to ...login_success.html?#access_token= There is now a "?" character before the "#" character.
I've seen this in a lot of apps in the store recently so it's probably not you doing something wrong but rather a change by Facebook which hasn't yet been reflected in the SDK.
Have you tried using Windows Azure Mobile Services Authentication instead?
See guides at http://www.windowsazure.com/en-us/develop/mobile/how-to-guides/register-for-facebook-authentication/ and http://www.windowsazure.com/en-us/develop/mobile/how-to-guides/register-for-facebook-authentication/ for more information.
I'm using the LoginButton control of the Facebook SDK .NET for WindowsPhone and have the same issue.
I Fix it, downloading the project from github Facebook-WinClient-Sdk and changing the line 186 of FacebookSessionClient class, for this one:
Uri endUri = new Uri("https://m.facebook.com/connect/login_success.html?#access_token");
The team of facebook sdk for .net will be fix this issue for sure, but i have a demo today and need it works!
I am creating Windows 8 app with C#/XAML. I want to share URL to logged in user's friend. Facebook has removed ability to post to friends walls via Graph API after 6th Feb, 2013. Facebook recommends to use feed dialog, but that dialog can be used with the JavaScript, iOS, and Android SDKs ONLY.
So how can I achieve this in WinRT ?
UPDATE 1
I found there's one more thing available that's URL Redirection. So I need to use WebView (which is one of worst control in WinRT) temporarily to open that URL and user will press "share". This way kills the UI/UX :(
UPDATE 2
I tried to use the URL Redirection, but I am getting error stating "An error occurred. Please try later". I searched about that, I tried all the ways like sandbox mode, double checking app ID but nothing worked for me. When I use app ID of graph api explorer it works.
Working
https://www.facebook.com/dialog/feed?app_id=145634995501895&display=popup&link=http://stackoverflow.com&name=Stack Overflow&picture=http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon#2.png&redirect_uri=https://developers.facebook.com/tools/explorer&description=Stack Overflow is a question and answer site for professional and enthusiast programmers.&to=100000692924752
Not working
https://www.facebook.com/dialog/feed?app_id=159248604260839&display=popup&link=http://stackoverflow.com&name=Stack Overflow&picture=http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon#2.png&redirect_uri=https://developers.facebook.com/tools/explorer&description=Stack Overflow is a question and answer site for professional and enthusiast programmers.&to=100000692924752