Facebook app requesting Youtube watch history - facebook-graph-api

We are working on an idea of a FB app which let's us retrieve youtube watch histories of app users.
I know there's the possibility to retrieve watch histories through youtube's api, but in combination with a FB app I couldn't find examples.
Any input on this is much appreciated, thanks!

These two are orthogonal. Since you didn't specify a language, I'll assume you're using Python.
Write an FB app using Canvas to display output to users ... I assume you are using Canvas.
Use the YouTube API and Python client to make API calls. You'll need to use a database or some other storage engine to link a user's Facebook API auth token with their Google auth token. Both are using OAuth 2.0 (though they are different flavors), so once you learn one, the other should be easy.
Before I answer anymore questions, it's probably a good idea for you to work through the getting started guides for both Facebook's API and YouTube API first. After you have some understanding of both, pick a stack and you should more or less be ready to go.

Related

How to access data of my own non-business Instagram account?

I'm looking for the right approach to solve the following problem:
For my own non-business Instagram account I like to read which accounts follow me and which accounts like and comment my posts.
I read about the old and the new API, about API deprecation etc. Now I'm unsure which approach shall I choose?
Instagram Platform API
Graph API
other approach like browser automation (e.g. InstaPy)
Instagram/Facebook says "If you are building apps for Instagram Non-Business Accounts, please use the Instagram Platform API". But the process to get an account seams to be complicated. And as I understand until 2020 Instagram will deprecate this API completely.
Additionally as I understand the sandbox mode doesn't help me, since it is restricted and won't show the real results.
From what I can tell, you should use the Instagram Platform API. I think you're right that the Graph API is only for servicing Business Accounts.
I'm in the same boat. I made an app that lets users sign in with their own non-business accounts. Setup OAuth flow using the old API, which works in sandbox.
However, I submitted for approval this week and haven't heard anything. There's no way to contact Instagram or know how long it will take to get approved.
I personally have some experience with InstaPy and I can tell you that it is used mainly for directly interacting with said accounts. You can follow, comment, like, etc... on these accounts that follow you but actually accessing a list of all of them would be more tricky. That's why I wouldn't recommend browser automation for the goal you have set out for.

FB Graph API - cannot enter with my own App token

i facing an issue regarding the FaceBook Graph API.
actually a friend of me, have an FB App whitch can be used for the Graph API.
But in that case I activate a FB dev APP for myself, i'm not able to generate a valid security Token with the App-ID and App-Security.
At first the App is live and activated. For that I don't understand the error message at the end.
Second I don't want to have a User-Token with a validation for an hour.
These are the step's i following:
getting App Token
https://graph.facebook.com/oauth/access_token? client_id=20179479xxxxxx&client_secret=3048xxxxxxxxxxxxxxx&grant_type=client_credentials
The result i'm receving:
"access_token": "20179479xxxxxxx|Pqxxxxxxxxxxxxxxxxx",
Now if im trying to use the Graph API Explorer and trying these token as authentication, I'm facing an #200 OAuthexception
my request:
Get -> /v2.12/coca-cola
"(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/",
Have somebody any ideas how to solve or what i'm missing here?
With the Security Token from my friend he can use the example with coca-cola from the developer like in the documentation and example from FaceBook as well.
Thanks in advance
Facebook is changing the API due to a security issue. This means new apps have more restrictions and less access (for the minute) than apps that were already registered and using the API, probably why your friends key works. Seen as your app is either new or hasn't recently accessed the data you are requesting, you currently cannot fetch it.
Its not known what features will be removed from the API following this incident - as a result I wouldn't come to rely to heavily on any feature the API offers.
Im hearing that the ability to retrieve events could either be removed or the data you can access from an event is going to be severely limited, however thats not from any official facebook source. All apps will be subjected to a review according to this official facebook post, before they are granted access to the Events API, Groups API, and Pages API.

Google calendars django website

I am trying to display and maintain a separate Google calendar for each user on my Django website. I also want to synchronize each users' Google calendar on the website, with their actual Google Calendar so that events are maintained and displayed not just on the website, but when they log into their Google Calendar through their Google account.
I have no idea how to approach this. Does anyone know how I can do this?
The first thing you are going to have to do is look into OAuth2 for authentication this will allow you to access your users Google Calendars. You will just need to save the refresh Token for each user then you will be able to access the information again by requesting a new access Token.
After that you should look into the Google Calendar API reference
There is also a Google Client library for python that will probably make things a lot easer. Google APIs Client Library for Python.
I don't have any django or python experience so I cant help you out with any code. But if you get stuck just ask a new question on Stack. These links should at least give you an idea of where to start.

Request data from my Google Glass to Mirror API?

Since you canĀ“t do all the nice looking stuff with the GDK at this point (html, images and so on) on cards. I was wondering if there is a possibility to ask a Mirror API from within my application (created with GDK) to send me some data?
Example:
I see the flow like this:
The GDK app is started with "ok glass, search app"
You talk what you want to search for.
The app takes the word and asks the Mirror API for a result.
The Mirror API sends the result to the glass timeline.
Regards
Joakim
Absolutely. If it makes sense for your app to either communicate with an external service that sends data back via the Mirror API, or calls the Mirror API itself, then you can certainly do so. (Although you begin getting dangerously close to just doing it all in Mirror at that point.)
The biggest challenge you'll face is having your app go through the OAuth dance to get an auth token to use.
It sounds like the core of your issues is that you want a richer way to display content in the static part of the timeline to the right of the clock. You have a couple of options.
GDK
If you'd like to stay pure GDK, you can create your own view, and flatten it into a bitmap. The steps to complete this are the same as for other Android devices.
Mirror API
You could also use the Mirror API to insert HTML static cards using timeline's insert method, but to do this you will need to communicate some authentication information to your GDK Glassware. For example, if you want to insert into the Mirror API directly from Glass, you would need a way to provide an access and refresh token to your GDK Glassware.
There is no graceful way to do this with the released APIs, but I've seen some people accomplish this using the OAuth 2.0 flow for devices or scannable QR codes.
If you go down this route, be prepared to update your implementation. Google has announced improved support for sending authentication information to GDK Glassware. Once it's available you will want to switch over to it.
Mirror API allow you to communicate back to it from Glass through the contact that you can create using Mirror API.
How it works -
you create a contact,
then when you need to do wit GDK on step 2 of your flow is share a
note with your contact
the words get transcribed and delivered to you Mirror notification
listener.
the mirror notification listener on server get the text of what kind
of app you would like to search, perform the search and deliver the
result by simply publishing on your timeline.
That's the best that i can see right now.
Here is a link how to declare voice menu commands (now only two are available, but you can propose more)
https://developers.google.com/glass/develop/mirror/contacts#declaring_voice_menu_commands
P.S. To go through oauth2 challenge - download sample mirror app
https://developers.google.com/glass/samples/mirror edit you
oauth2.properties file with creds you will get on your google development web console (you will need to create the app with google and request to enable Mirror API)
then run mvn clean install
then run
mvn jetty:jetty

Sample of using Facebook Connect with MonoTouch

I'm using MonoTouch (latest version) and I want to be able to allow the user of my app to make a wall post based on a log entry made in this app. All I need is a simple implementation so that the user can tap "Share on Facebook" (UIActionSheet) and then it logs them into Facebook (shows the login) and returns the token which I can then use to make the WebRequest to post to their wall.
I've seen the MonoTouch bindings on github but have no idea how to use it. Can someone please provide a simple sample of how to just login to Facebook to retrieve a token so I can post. I know how to do the post, it's the auth process that I'm not getting right.
Thank you.
Neal
Neal,
I have added a sample that replicates about half of the Facebook sample here:
https://github.com/mono/monotouch-bindings/tree/master/facebook/sample
I would recommend to use client-side javascript login more than native device login.
Sooner or later you might want an Android, Windows Phone or even Facebook version.
Having an In-App browser wrapper to deal with javascript and direct Graph API calls are easier for cross-platform implementation. Just from my personal experience.