How to Post on Google Plus with Google plus api by Activities.insert in Asp.net Server or Client Side - google-plus

Guys i want to Post on Google Plus with Google plus api by Activities.insert in Server Side on Asp.net C# .
i am done sign in process and i have also access-token then i try lots of code.but not successful .Please help him to short out this Problem

Related

OAuth2 Troubles with PicasaWeb API

I have spent the last couple of nights bashing my head against the wall amongst a see of conflicting out of date documentation and semi-helpful blog posts that were/are appropriate to what I am trying to do.
Essentially I want to write a wee personal app do download my images from PicasaWeb/Google+ and store them on my local hard disk.
I have managed to do the following:
Figured out the GData API for the appropriate request to get private album data (works fine in my 'google-logged-in' chrome browser)
Got the correct private data back from my GData URL with the token generated by the OAuth playground.
Managed to get an OAuth2 token back from https://www.googleapis.com/oauth2/v3/token using JWT.
However - when I try my access token I generate myself I get back a forbidden response with the message 'Not authorized to view access private'.
I am pretty stumped - my only guess is that my service account configured in google developers console doesn't actually have access to my personal google stuff like google+ photos. When I look in there I can see the OAuth playground has access. How do I give my app access - and do I need to in this scenario?
Thanks in advance,
Robert
"my only guess is that my service account configured in google developers console doesn't actually have access to my personal google stuff".
Totally correct.
I guess I see 2-3 questions per month on SO where people have made the false assumption that a Service Account is some kind of proxy to their Google Account. It isn't. It's a completely new and independent account.
The two approaches you can take are:-
Share the items to the Service Account so it has permission to access them.
Give your app direct access to your Picassa account. See How do I authorise an app (web or installed) without user intervention? (canonical ?) for the steps involved.

Google Plus Login API not working correctly

Here is the demo of Google plus sign in button using OAuth 2.0.
I want to ask that, I extracted the client id and used it in my code for authentication. Going by the rule it should not work as I do not have the correct JavaScript origin for Google's API access ( which I am presuming to be there server and not localhost). Had Google set it to localhost, only then my authentication should work. I want to know why is it working? I just have their Client Id that's it.

Google Plus API Nuget Package

I need to create posts, etc through my ASP.NET MVC 4 application.
Does anyone know decent library for Google Plus API? (Preferable as a NuGet package).
There is currently no publicly documented API that lets you automatically post to your Google+ page or stream.
There is an API that HootSuite is currently using that is slowly opening up to other vendors. See https://plus.google.com/u/0/104946722942277428266/posts/LUi2ZNyRHag for more information about what is coming and how you can sign up to request access to this. This is expected to allow you to post to a Google+ Page.
There is also the "Google+ History API" that is currently in developer preview which will allow you to create moments for a user, but they would need to manually share these moments on their stream if they choose to do so. See https://developers.google.com/+/history/ for further details.

Google PHP API - (403) Access Not Configured

Im using the Google PHP API Client http://code.google.com/p/google-api-php-client/ to retrieve data from the google API.
Logging in thru OAuth2 and fetch user information works like a charm, but when I'm attempting to access the goole analytics api i get this 403 code error every time. Hundreds of users with the same problem forgot to activate the Google Analytics API in the service settings, or simply provided incorrect credentials (client_id & client_secret). I've tried to enable/disable the Google Analytics multiple times, and logging in/out from my google accounts, but no result.
Anyone that has any pointers for me?
(Remember, the OAuth procedure works, since I'm getting both an access_token and refresh_token)
I'm using the simple.php example in the class examples folder...
I'm working on Drive myself and understand the issue. I've been having some troubles understanding Google and their PHP api somewhat. I've finally got it to work with some clarification of examples found around the internet.
Your problem sounds like you didn't set your scope to Google analytics but, please be clear in the steps you've taken as well as the code you've tried using.
The error could be as simple as forgetting this line in your oAuth callback file:
$client->addScope(Google_Service_Analytics::ANALYTICS);
To something complex as understanding if you need a full paid account to access information from Google about your Analytics (not included as free like Google+ and Google drive).

Google Plus API - Retrieve code programmatically

I'm using Java with Google Plus API. I'm using OAuth 2.0. When a user is authenticated, an access code is returned in a browser. Now, given that the code must accompany a call to the Google Plus API, I currently have to manually copy the code and use it in making calls to the Google Plus API. What I wish to do, however, is to programmatically retrieve this code; eliminate the manual copying.
Any assistance will be highly appreciated. Thanks in advance.
It sounds like you're writing a command line or some other non-web application that uses the Google+ API. This throws a little bit of a wrench into the token delivery via HTTP redirect. Without the redirect there's no way for the OAuth web pages to communicate with your code and hence you must copy and paste it.
There is one work around that seems to work pretty well. You can set up a local web server, such as an embedded Jetty, and complete the OAuth flow by redirecting the user back to their locally running web server.
You can see an example of this implemented in oacurl which is hosted here: http://code.google.com/p/oacurl/