I have a problem with facebook and google logout. My scenario is when user first time login with facebook or google for particular site.(using clint api, it will redirect to their own web browser). then it will show the login page . after successfully logout if again login with facebook or google i m trying it's not showing the login page , it directly shows the login success message.(because webbrowser history already there, and i am not able to delete the history) so in this situation multiple user can't login with facebook or google.
have anyone idea? how to solve this problem?
On WP7 you'll have to use InvokeScript and javascript to logout and/or get rid of cookies required by different services like FB and Google. Fiddler comes in handy for this.
If I remember correctly, for Google you'll have to watch for specific URL's and cancel navigation, run InvokeScript and continue navigation.
I worked on a project that accessed different providers and this was the solution we were able to get working.
On WP8 there is a method to clear cookies.
Try finding out if there is an OAuth or API url for logging the user out such as
m.facebook.com/logout.php?confirm=1&next=(url encoded login page)
to navigate the user to.
Related
I'm trying to authorize a spotify user in my windows forms application. I am able to make a GET call to the web API, and I get a response back that is HTML. When loaded into the browser, this HTML is a login page, but my question is two parts.
1) What would be the best way to display this login page. Obviously if I could launch the browser and have it return the authorization code somehow, that would be best, which brings me to my second question.
2) How would I get the authorization code from the browser when I launch the login screen? I can't see a way that my forms application would be able to receive any information after the login screen is launched. Sorry if this seems obvious.
I figured it out, the URL I was using was not meant to be requested from, but to have the user navigate to in their browser. I basically just put the link in my application as a button and it would launch in chrome. Once the user logs in, I used http://httpbin.org/get to display the authentication code and just copied the code into my app as a temporary fix. Obviously this is not ready for release, and I am still working out how to get the code from the redirect url to my application, but it's a step in the right direction!
1) You can display a web browser inside your form to do the login part.
2) Browsers like Chrome can't return values. You could look at the data sent / received from your browser and search for an authentication token or something like that
We have a WPF application ,and using a web browser control in it, we are unable to login at certain sites (e.g. this one) in the browser control.
I am able to open the login screen but even though using valid credential it is redirecting me to login page only with the WPF APP. But when I opened in the chrome or any other browser it works fine.
Is that a issue with browser control in WPF application?
Sorry this is not answer but reply to users who given suggestions to us:-
#H.B:- We are using WPF not Iframe as IFrame will not allow to open other domain site into our domain as it voilate same origin policy.
#pix:- We don't have control on others site (these site not belong to us, it can be any site) login mechanism, here we are just trying to open other site into our WPF application's browser control,for most of site we able to login do the stuff but some of the sites are not allowing to login.
We debugged and found that once we login, it's try to navidate to other page of stie which is clearly visible (page name/ url) but then some thing happens and the site redirect it back to the login page once again.
Please let us know if you need some more inputs.
I am using Facebook sdk to integrate Facebook in my app. I have used Login button to log in into Facebook which redirects me to Facebook Login page automatically, means by providing your appId. But the problem is that when I click on Logout button it successfully logs me out of the app but when I click on Login button again it doesn't ask for any user login and password (it doesn't redirect me to Facebook Login page, but directly redirects to my apps home page).
How to destroy all cache/session info?
You can not using Facebook SDK API. Facebook proposes,
Windows Phone apps must create their own way of storing when a person
has logged in, and when that indicator is not there, proceed on the
assumption that they are logged out. If someone is logged out, then
your app should redirect them to the Login dialog at an appropriate
time — for example if they click a Login button.
This Official page might throw more light on it.
Basically, you need to have a flag stored somewhere in Isolated storage, that can be set to rue of false as and when user logs in and out...and redirect him to login.
Well, on a lighter note, its not less known fact that Facebook Logout button is a hardest button to find.. :) Hope this helps...
I am currently developing an app that uses a public API. After performing the login procedure with that API, I get a cookie that I store in my app. I need to pass this cookie with every API call, that I request. So far so good.
Now unfortunately this API doesn't give me acces to all features of the service. What I want to do is giving the users of my app a button, which open a WebBrowser for that specific features. The problem is, that the user is, of course, not logged in in that WebBrowser.
What I found out on my PC is, that the login-cookie, that I get from the API, would actually work for the website itself as well. So what I want to do is: When the user clicks on the button, it opens the WebBrowser and passes the login cookie I already have to the WebBrowser, so the user is already logged in and can use the feature. Is there any solution for that problem? I couldn't an answer for that.
Cheers! :)
You can only set cookies from invoking javascript on the page when loading is completed.
Windows Phone WebBrowser set cookies
I have a web site and I want to give a opportunity to users to invite their facebook friends to this web site.
I have:
C# Facebook SDK installed to project
Facebook Dev Account with new app
Users at my site use site's auth control (not oAuth). They register on site and can connect their Facebook profile.
The question is next one: How to allow users to invite their friends to web site not using facebook oAuth (just sending user id) with Facebook C# SDK (or without if it's not possible in this way)
UPDATED
I want to do this in next way: user click the button "invite friends" (standart invitation screen of FB), check friend, click invite - finish action :)
Thanks a lot!
I think you should look at the Requests dialog here: http://developers.facebook.com/docs/reference/dialogs/requests/
Only drawback is, that when users accept the request, they'll be shown your Canvas URL - which means this page loads inside the Facebook UI - they're not redirected to you site entirely.
You could use this page to "sell" your website, so they navigate to your site.
Another approach is using the new Send button: http://developers.facebook.com/docs/reference/plugins/send/
This will send a message with a link to your site.
I dont think that is possible. Becuase to access user private data you need to authenticate yourself as well as user with facebook. Facebook provides OAuth for the same !