What mechanism to use with YouTube access in Android. - android

I am trying to implement a simple mechanism to authenticate the user so that through my app he can interact with YouTube. But there are several points in which I am confused about, following is a list of the same:
1) What login mechanism to use? I have implemented G+ sign in however the docs here are very confusing:
a) https://developers.google.com/youtube/v3/guides/authentication?hl=de
This link asks me to use an O - Auth 2 authentication, however
b)https://developers.google.com/accounts/docs/OAuth2InstalledApp?hl=de this link tells me a different story.
I simply want the user to gain access through her account and upload videos, why is this so much painful?

Check the Authentication at YouTube Direct Lite for Android.

Related

Link to login to social Media from app

In my app I want to have a link or button that can use stored credentials to login to social media sites - say facebook. But, since I plan on having a multiple links/buttons to different sites that may use different login info, I cannot force users to login to my app using any of the social media credentials.
Please forget the storing of credentials for now - that is a different issue altogether.
My question is Can I send the user's info to Facebook to allow them to login without having to take them to the login screen? If so, where to best find the information to do that?
Sorry if this is a noob question, but I am a noob to app dev and still trying to get my direction. Any sites or links with information would be appreciated.
sorry for the answer but from my experience you need to go through Facebook API to log in an android application using facebook,same for other social network. No clue what you wanted to do use a HTTP POST with the credential ?
There is a serious security issue with what you're trying to do, because it's you're application that handles the social network credential and so you would need to encrypt them store them and so on...
So if you want to give a try to Facebook Android API it's here : https://developers.facebook.com/docs/android/getting-started/
Dealing with the Facebook API is too much easy. You will follow some steps to import it into your project. Register your App on facebook developer site. Put the facebook button into your layout.
When the user clicks on the button the API will handle all the subsequent steps starting from taking the user username and password and will reply to you with a temporary accessToken that will be valid for two months. This is the only communication way with Facebook API, if you want to give the Facebook API any info with any other way. I am sorry to tell you you will not be able to do that.

How to implement user login with Google, Facebook or Twitter in Android app?

I am trying to implement user login via social networks to my app. User should login with their google, facebook or twiter account to the app and create content that will later be sent/or synced to the app rest service.
What is the best way to do this?
I was successful with adding google and facebook sign in button and getting auth tokens from them but then i started reading on some tutorials that include account manager which is needed to implement sync adapter for data that needs to be synced with server, but as i understood i need to create my own login and add new user implementation for this to work?
Can i use social login with sync adapter, or do i need to implement my own account management?
Please point me in the right direction.
I personally avoid tutorials that "help" you to build a customized social API's interface, first because they could rely on old API version (take Facebook for example, their graph API authentication system has changed a lot through years), second because they could propose a solution that is not what you are really looking for.
Instead, why don't you simply follow the official tutorials from Facebook SDK page (https://developers.facebook.com/docs/android/scrumptious/), Google and so on?

How to find When a Facebook User has Last Used my App, using Graph API?

I am an Indie Game Developer, working on a multi-player Android game. I now need to implement a feature, where I want to show my Facebook Friends Activity of my Game.
I already know how to Identify how many of my friends are playing my Game (Or using my App).
But, now I also what to display the last time they played my Game.
So, to summarize :
How to find when a Facebook User has last used my App, using Graph API?
Assume that my Game has an authorized Facebook session of every User playing it.
Is this even possible?
I know that I can write my own server-side code to track user activity on my Game. But I think I can avoid all that, if Facebook can give me the information.
I know that I can write my own server-side code to track user activity on my Game.
That’s what you’ll have to do.
But I think I can avoid all that, if Facebook can give me the information.
No, this info is not available anywhere through the API or FQL.

android openid authentication

It might sound silly but i went through a lot of code examples for Open ID authentication of android application. This one says
https://sites.google.com/site/oauthgoog/oauth-practices/mobile-apps-for-complex-login-systems/samplecode
that you have to make a webview and from webbrowser get the token and all but what i want is really simple , given options for google, facebook and twitter, I want user to select one and authenticate without any browser or so. Is that possible?
This one also i tried but it apparently seems to support only google accounts but i want all three
http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app
Any help ?
OpenID technology is based on browser confirmation, so you can't identify the end-user without it. Take a look at this link: http://lists.openid.net/pipermail/openid-code/2011-January/000190.html

Integrating Facebook and Twitter feeds in Android application

I'm adding social integration to my app, and am looking for general advice how to go about it.
At the moment the app is showing feed of particular Facebook wall (authentication handled by Facebook's Android SDK) and feed for particular Twitter hashtag. That's a start, but I want these feeds to do a bit more. For Facebook:
For long feed items, user should be able to "see more", including linked pictures
Links inside feed items should work and open in browser
Like/unlike feed items
Comment on feed items
Post on the wall (create another item in feed)
Similarly, for Twitter:
Links inside tweets should work and open in browser
Reply to, and retweet tweets
Create tweets that contain the specific hashtag
Since Facebook and Twitter both have comprehensive APIs and there are enough code samples floating around, this is all technically doable, but seems a lot like reimplementing Facebook and Twitter clients. That's a lot of work to get all the little details right, maintain code for API changes,
and not really in the scope of my app.
So I'm thinking how to avoid reimplementing Facebook and Twitter clients.
Idea one: direct user to mobile versions of the respective sites and be done with it. Downside is that user will have to go through cumbersome authentication, even if there are dedicated client apps already installed and authenticated on user's device.
Idea two: plug into existing apps using intents system: if official Twitter app is installed, use that to do hashtag search. If Seesmic or Twidroid or some other twitter client is installed, use that. As a fallback, open Twitter's mobile website in browser. Similar for Facebook. Downside here is that intents for "show facebook stream" or "search tweets for X" are not standartized. Most current apps don't even have documented ways to plug into them. Using undocumented entry points in those apps is possible but would make my app hacky and brittle.
So, this question, how you've been dealing with integrating bits of Facebook and Twitter functionality in your apps, or seen done by others?
Here is a good tip about how to implement twitter/facebook oauth:
Create new activity and name it OAuthActivity.
Create new class that extends WebView.
Follow the facebook developer guide for WEB applications (not mobile ones!) and implement oauth calls inside of your WebView. For Twitter use Signpost-core with signpost-commonshttp4 to get oauth (facebook uses its own variation of oauth so you need to do it yourself).
Override WebView so it closes itself when facebook redirects your WebView subclass to your callback url.
Use OAuthActivity to return OAuth key / secret to your main activity via RunActivityForResult.
This way screen orientation change will work; you will have same architecture for FB and TW.
I have implemented it this way, yet I can not share my code (it is licensed for my company).
When I added Facebook and Twitter integration into my app (shameless plug: Secret Message), I attempted to invoke an installed Twitter client app via Intent. It wasn't fun, because there is no such thing as a "facebook/text" or "twitter/text" Intent. I know some Twitter apps create their own, but they're not universally used or even known.
So the other option is to get a list of all installed apps and filter on those you want to display in a chooser for the user to select. But retrieving a list of packages and their user-friendly names takes forever. So I hated that option.
I ended up integrating a very simple GUI for both Facebook and Twitter into my own app, and just used OAuth to authenticate users.
I hope this helps you pick your direction.
implementing Twitter integration is pretty easy on Android (you can use Twitter4J which is a pretty nice Twitter Java Library to access the public web services).
To integrate tweeting/retwreeting is basic stuff once you have authenticated your twitter user (just have a text box to allow users to enter thei 140 characters and a button to submit it - creating tweets, retweeting, replying etc is all a matter of 1 or 2 lines of code using twitter4J). The link stuff requires formating your listview to handle weblinks and open as appropriate.
The toughest part of the whole twitter integration thing is getting the OAuth stuff done - there is a tutorial on how to implement twitter and the OAuth authentication stuff here
Unfortunately, I have never tried facebook integration, but hopefully someone will be able to help out with that.

Categories

Resources