Google Analytics API displaying a single account - oauth

I've been working with the Google Analytics API to create a page showing some specific statistics. Right now everything is working, except that after the user goes through OAuth, it is displaying statistics from their Google Account.
Instead, I always want it to display statistics from a single Google Account that I own/operate, and everyone else is just viewing the data from that account.
I haven't seen a way in the GA documentation to accomplish this. I would assume the user wouldn't have to log in, because I'm just showing them my account, but it's not the end of the world if they have to.

If you're looking to create a place where users do not have to go through OAuth, you should really look at using Google's superProxy to publicly display data.

Related

Is there a way to collect Google IDs which access a Google Site?

I have created a Google Site which links to various Google Classrooms. I would like to know who is using the site.
Is there a way of recording the Google ID in a Google Sheet, for when someone accesses the site?
Any help or even a point in the right direction would be great.
Thanks
Ok, since you are using Google Sites, you can create a user start page by following these steps, this page will ask the users to authenticate with their emails, and will allow only users from the organizational unit for which the site is allowed.
After that step, you can use Google Analytics with your Site to track the behavior of users in your Site.
I suggest starting with a quickstart of Google Analytics to get the hang of it.
And soon enough you will have it set up to suit your needs.

Youtube API - Switch between normal and brand accounts

On youtube.com, we can easily switch between channels by clicking on the user picture on the top right of the screen, then 'Switch Account'.
I would like to have a similar functionality in my app. I already made it possible to connect using any account (brand or normal), however I need for one login to retrieve data (login informations, profile picture, etc) about all brand channels.
I can of course ask the user to connect multiple time, and then store the informations that I need, but I would like to avoid that.
Is it possible to do that?
Edited:
I don't have any code for the moment, but by looking at the youtube api I'm not able to find any way to do this. The ideal should be to have something similar to the /{user-id}/accounts of Facebook's Graph API https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Faccounts&version=v3.1 which allow to see all pages accounts – Raphael just now edit

New venue from within ios app?

(EDITED for clarification)
In a nutshell we're trying to allow users to create Foursquare venues in our app but we're having problems.
Detailed problem description:
We're developing an iOS app where our users can create events.
Users register and login with Facebook.
When a user wants to select location for their event they do a text search using Foursquare's API. (Just like when you add a location to your Instagram photo for
example if you're familiar with this).
If the venue exists the user will see it in the list and select it and all is fine.
If however the venue doesn't already exist in Foursquare we've found no way to add it. Compare to Instagram where you
get the option of adding the location directly in-app through
Foursquare's API if the search turns up empty.
Thanks user rckoenes for the API link. We're interpreting the API as it is OK to list venues with "userless access" but in order to make a POST the API "Requires Acting User".
Somehow Instagram seems to manage to allow this without forcing the user to authenticate to Foursquare but we don't see how and we want to avoid having to have this authentication in the app settings(asking them to do this with Facebook is asking enough).
Foursquare API link: https://developer.foursquare.com/overview/auth
I hope this clears things up.
Original post:
If our user can't find the right venue in our app (location search powered by foursquare) how can they create it?
This is possible within Instagram but we haven't found how to replicate it.
Is it possible?
We're developing for iOS.
Thankful for any helpful comments :)
Great question. To answer "how to add venues?", rckoenes was indeed correct when he suggested the venues/add endpoint, but you're right to note that this isn't possible unless there's an actively logged in user.
Just to clarify though, Instagram does not add venues to Foursquare when they allow their users to "Create a custom location." When an Instagram user does this, a "text tag" is associated with their photo and this never gets added to Foursquare, nor is it even searchable on Instagram again (the user would have to re-create it every time they want to use this location). Instagram's UI subtly differentiates this by coloring Foursquare venues as blue and allowing users to see more details on the venue while graying out non-Foursquare venues. The reason that these text tags aren't able to be searched again is that doing so would effectively create your own independent location database, which is a violation of our usage policies.
You can consider Instagram's approach if it's appropriate for your situation, but of course the best solution is to allow your users to authenticate through Foursquare, saving their access tokens, and make venue/add requests on behalf of users themselves. This has recently gotten much easier since the release of Foursquare native auth for iOS.

Find Adwords ads from a specific website?

Is it possible with the Google Adwords API to get ads (both text and images) from any website, even if I don't own it?
For example, I'd like to see all ads that www.website.com does. Is there a way to extract that data?
There are sites online that do it, so there must be a way, any idea?
AdWords API only displays the Ads that you have created.
For any given AdWords account, there has to be a Campaign, which have AdGroups, which have the Ads and the user can only access Ads within that particular account.

Using oAuth to retrieve tweets of a particular ID (equivalent to a page in facebook)

I need to know as to how to implement oAuth in an iphone application.
I have already gone through lot many posts but none of them shows as to How to retrieve tweets from a user profile (like we access facebook wallposts). I tried using an example named bengottlieb/Twitter-OAuth-iPhone but all it does is show the Login prompt and posts a sample Twit at my Twitter profile.
I need to make an application where
the user can view twits for a particular page (same as accessing the wall post for a Page)
Post tweets that will appear on his profile or if possible then also at the profile page for given ID
I was able to fetch the tweets for a particular id using http://search.twitter.com/search.json?ID but may be due to closing of Basic authentication it does not return to me tweets older than a specific time period.
The Twitter search API is not meant to retrieve the tweets from one particular user, even though it does seem to work (up to a certain point back in time). As far as I know the search API does not need authentication, so you're not in trouble regarding the deprecation of Basic authentication there.
To retrieve the tweets for a user, you need to retrieve their timeline. Be sure to use OAuth authentication, as indeed Basic authentication no longer works now.
Check out http://dev.twitter.com/ for more information. The API is documented quite well. You mention basic authentication, so perhaps you could start with http://dev.twitter.com/pages/basic_to_oauth to get you going?

Resources