I'm using Facebook C# SDK for my WP7 app. The authentication dialog that prompts the user to grant permission to the app is displayed full screen on the app (about 480px I guess), but the allow/don't allow button are hidden at the bottom of the frame, which needs to scroll. There is a large part of the screen that is white though, so I think Facebook is serving a dialog for a larger screen.
How can I specify the size of the screen when authenticating over Facebook oauth ?
This is a bug with Facebook. I would suggest opening a bug with Facebook at https://developers.facebook.com/bugs.
The one thing you might do to work around the issue is to inject either javascript or css into the page using the browser control. Your javascript/css could fix this issues and resize the page. I have done that before on an old WPF app and it worked well.
Unfortunately, the Facebook support for Windows Phone is very poor and there are several major issues of this type.
Related
I am implementing an application that has Barcode scanner for this added webcam permission in capabilities then Barcode scanner working as expected but in the application, it has a login page which is shown in Webview when the user trying to login at that time showing the camera permission request popup which is not required to show here(Barcode scanner and login both pages are different). Can you please help me out to resolve this issue?
and is there anyway to give Run permission for camera access.
[![enter image description here][1]][1]
The dialog will appear only when you need to use the related APIs(camera capture). Once permission is granted once that permission will persist until the user retracts it.
And if showing the camera permission request popup which is not required to show here you need check if current page has called camera api such as initialize camera
Can we give runtime permission just before opening the camera other than mention in capabilities using UWP
I'm afraid you can't give runtime permission for opening camera, as Raymond Chen comment above, this is system behavior, and there is no such api could manage it manually.
I want to make UWP app. In which user will login using username/password. Using these credentials an API will be hit. Which will return authenticated user. if authenticated user is returned then his profile page is shown. otherwise he should stay at login screen. Also there are more screens in my app. User data should be retained on each screen. and if new user logs in his corresponding data should be shown.
Since I am from asp.net background. Here are my questions.
1) Is this approach fine in UWP?
2) Where to save user data after login?
3) Should I save it using SQLlite or In-memory?
4) Is there any concept like Session In Websites so that I can get logged in user on each page
5) Also How to make this app to run of fix resolution (800 x 600)
Any help on this is appreciated. Sample code will be more helpful.
1) Is this approach fine in UWP?
Yes. You could achieve it in UWP.
2) Where to save user data after login?
There're multiple choices. See Store and retrieve settings and other app data for more information.
3) Should I save it using SQLlite or In-memory?
It dependents on your requirement. UWP supports SQLite database. See Use a SQLite database in a UWP app.
4) Is there any concept like Session In Websites so that I can get logged in user on each page
You could use local app data settings. It's existed in the whole appContainer. You could get it on each page in your app. Please note that The lifetime of the app data is tied to the lifetime of the app. If the app is removed, all of the app data will be lost as a consequence.
5) Also How to make this app to run of fix resolution (800 x 600)
Setting fixed size for UWP app is impossible. Please keep in mind that UWP is designed to run on different devices with differing screen orientations and sizes, but you could resize the app view. See Window resizing sample.
The default behaviour google uses for authenticating users right now is to open up the default system browser and have the user log into the account associated with the application, and then leave it up to the user to return to the application.
Since I can't avoid this process I was hoping I could make the authentication process take place within a wpf browser control so that its a bit friendlier to the user.
Is it possible to make this authentication happen in the browser control?
This is a pretty lengthy stackoverflow question which appears more as an answer =) or an example. It does the Auth flow with Facebook but I am sure the concepts apply to google as well.
Facebook OAuth in WPF & C# Example
HTH
I am trying to use Google OAuth 2.0 in windows phone 8.1. All is well but I am getting an extra screen after user consent screen which has a message
please copy this code , switch to your application and paste it there.
I need the app to resume after the user gives the app the permission to access requested data.
Someone help me figure out why I am getting this extra screen and how I can avoid it an resume into my app again
You should select your app type as "web application", then set your redirect uri.
Please refer to below post.
How to prevent the extra view displaying an access code when using Google OAuth 2.0
I'm using the Facebook C# SDK 6.0.20 to allow users using my app to log onto facebook. I'm using the display=touch parameter so that the fb login page renders for mobile devices with smaller screens. The problem is, fb keeps reading it as display=wap which is being deprecated. As a consequence, users are receiving an error message when logging on. Is there a solution to this other than forcing users to see the ugly full screen display on a mobile device screen?
Facebook has been unhelpful and unwilling to accept this as a bug but rather says it is a "feature by design", but everyone else seems to think it is a bug. (https://developers.facebook.com/bugs/355102764525510) Why would facebook try to discourage WP7 developers like this when they apparently have a good relationship with Microsoft, which provides them with map services for fb places?
Facebook display=touch for WP7 is now directing properly after recent facebook updates on July 5th. This should no longer be a problem.