I am currently writing an android app.
I intend to run my application in the background of my phone and I want to be able to detect when I submit a post using the Twitter app on the same device.
Is this even possible?
When you create the OAuth customer key in the Twitter Application Management (url https://apps.twitter.com/),
- that is one of the preliminary steps to implement the authentication-
you'll define there the source field (look for instance at the documentation from https://dev.twitter.com/overview/api/tweets) that will be reported in all the tweets posted by the API of your newly created Twitter app.
So when you get your tweets, you'll detect the ones posted by that specific app (on your phone).
More generally I have published an open source Twitter app for Android on github: https://github.com/giuliohome/TweetSearch just look at the API call where I retrieve the source of a Tweet for more details, basically a simple
jsonObject.getString("source")
By the same field you can detect the tweets posted by the official Twitter app for Android on the same device - assuming it is the only Android device from where your username is twitting with the target app, otherwise I'm not aware of any legitimate and standard way to detect the physical device
Related
In my win-fourms application, I would like to do something like to use the account password similarly to how apple has the touch id API. I could not find any information on this. Here is an example I saw in the built in groove music app in windows 10:
Thank you!
When Microsoft built the Universal Windows Platform (UWP) they built in an authentication library that allows you to use user's Microsoft Accounts. There is no built in support for this in WinForms or WPF apps.
However, you can use the Microsoft OAuth endpoint to accomplish the same thing, it just won't look the same (requires a browser popup for starters). More information can be found here:
https://learn.microsoft.com/en-us/azure/active-directory/active-directory-v2-protocols-oauth-code
The code basically requires doing a bunch of REST calls and providing a listening socket for an asynchronous response.
Is there any way to detect the source from which the app is downloaded? For example if the app has been downloaded directly from the store or it was redirected to store from some mobile site. Something similar to CampaignTracking in Android. Any library which can detect this?
If you are looking for a Rate & Review mechanism, use the MarketlaceReviewTask class. It is documented here. Here's a simple method to do it:
MarketplaceReviewTask mrktreview = new MarketplaceReviewTask();
mrktreview.Show();
You can fire this code from a click event or something similar. This opens the rate and review page for your app, after it is published in the store. That is all Microsoft is providiing currently to help the developers. If you are looking for detailed tracking or instant bug detection (after the app is published), you can use third party services that can do this. I recommend Appboy.
Unfortunately not.
As distinct from Android, Apps can only be deployed through the store (or a developer sideload) on Windows Phone. But there is no way to recognize whether a website hyperlinked to the store page or the user downloaded it directly via the store application.
I found a few links regarding the same. Flurry provides the support for campaign tracking through its library. A few links help here.
Flurry http://www.flurry.com/
Distimo
http://www.distimo.com/conversion-tracking
Tapstream
https://tapstream.com/developer/windows-phone-sdk-documentation/
https://tapstream.com/developer/conversion-api/
I know I have seen apps that log me in using Facebook but never present me with an authorization screen. I can not, for the life of me, figure out how to do this with Windows Phone 7. The best I have been able to get is using the Facebook for C# SDK to get the authorization screen in a WebView. This looks hideous and the page does not even appear to be mobile ready.
I have searched high and low for an answer and have found nothing. Wondering if anyone can point me in the right direction to getting this to work?
Yes, I also saw this kind of apps (e.g. Spotify prompts you to enter your Facebook account credentials rather than using the normal authorization flow). My best guess is that they either some kind of premium partners and have access to some private APIs or they use custom authorization flows (e.g. when you authorize an app on a website, the system saves authorization key in the database. The same app id/secret is then used in Windows Phone app and all you need to do is to type in your email/username in order for the system to locate authorization key that was saved earlier).
I also don't like the approach of displaying Facebook login/auth using WebBrowser control (mostly because of UI inconsistency) but I'd say that this is still the way to go in most cases (because this is the official and recommended way of authorizing the app and all other approaches seem hacky for me and also have their disadvantages).
You will want to be using the "server-side authentication" approach. The following document describes how it works: Server-side authentication (read also OAuth Dialog documentation for how to configure the authentication dialog). You can change the way the UI looks by passing a display parameter (either to touch or wap).
Please note that display=touch is currently broken in Windows Phone - Facebook always falls back to wap which is deprecated and will be removed as per July 2012 update (corresponding case: Facebook API can't be used with Windows Phone apps). It's also among known issues on Facebook C# SDK project page: Facebook C# SDK - Known issues.
Hope this clarifies things a bit.
Ultimately I want to create a desktop app that allows users to update their own status, view status' of their friends, update pics etc. - basically a lot of the functionality the facebook website provides. Through looking through some tutorials and sample projects it seems that an app must be created for the facebook account. Now is this the facebook account of the developer (i.e. mine) - which will provide an API key that will allow any other user to log in?? Does every desktop project need to authenticate the user through a facebook dialog window to take the users' credentials?? Where does OAuth fit into this?? If anyone can shed any light as to the structure of the facebook api and the ways in which I can grant this functionality from say a WPF C# app for example I would really appreciate it.
EDIT: Before complaints of a potentially huge question or too 'vague', my question is specific to the integration/use of the facebook API in desktop applications - not how to then retrieve status feeds etc. I'll work that out myself.
Per Facebook documentation, all desktop apps will need to implement some form of web browser integration, whether embedded within the desktop app or controlled.
See: http://developers.facebook.com/docs/authentication/
Desktop Apps
Our OAuth 2.0 implementation does not include explicit desktop app
support. However, if your desktop app can embed a web browser (most
desktop frameworks such as .NET, AIR and Cocoa support embedding
browsers), you can use the client-side flow with one modification: a
specific redirect_uri. Rather than requiring desktop apps to host a
web server and populate the Site URL in the Developer App, we provide
a specific URL you can use with desktop apps:
https://www.facebook.com/connect/login_success.html.
Don't worry it took me two solid days of trial and error and re-re-reading of the documentation on authentication to finally "get" it.
I want to add a facebook share and twitter tweet options in my WP7 app. Like in Android I want a pop up to be opened showing list of in build apps that allow you to do. Because we have intents in Android. Are there are ways to send such notifications to OS in WP7?
ShareStatusTask and ShareLinkTask will do this for you