How to get Google Contacts Image link Using Gdata python - python

How to get Google Contacts Image link Using Gdata python client.
I tried gd_client.GetPhoto(contact_entry), its allows to download the contacts images locally.
But i don't want to save images locally. I need direct image link so that i can populate in my web app dynamically, like <img src="google contact image link"></img>.
Any solution is really appreciated.

Use the newer google-api-python-client library, OAuth 2.0 authentication and you can get the photo URI from the basic user profile:
Obtaining User Profile Information
Here's an example of using some of this with AppEngine:
Google+ OAuth 2.0 AppEngine Sample

Related

How to upload images to Blogger Blogspot posts?

I'm using the API given here from Google, https://developers.google.com/blogger/docs/3.0/using . It allows managing the Blogger blogs easily. The problem is that the content that this API accepts is an HTML content. So, I must provide it with.
title
Hello, how are you doing today
...
So, to integrate an image on the post I must upload it to another image uploader service then get the URL and add it to a tag.
In contrast, if I want to upload the image directly to the Blogger UI, the image will be uploaded to Google servers.
My question is: How can I upload images to google servers as the Blogger UI do, then integrate them into my posts?
I too have been trying to work around this issue. What I did in the end is to use Google Drive API to upload the image and then get a shareable URL and embed it in the blog post.
This comes with its drawbacks, the photos are slower to load on the blog and is not accessible to crawlers. But works as far as the requirement is concerned.
If you find any way to get it done through Blogger API or through Google Photos API, please do let me know.

How to authenticate app to act as if it was my logged in google account

I have written scripts connecting to the google API to connect to bigquery and google sheets and slides.
However, currently I am trying to write a script that would be able to access a non-google site for which I am required to be signed in with my gmail account to access.
So essentially when I access this site in a browser, I am asked to login using gmail and allow the site to verify my details, and in return I can view the page. If I don't login with google I cannot view the page.
I am not sure how/if the google authentication process for my app could be set up in a way for it to login as if it was myself. But can anybody give me some advice on how I can get my app to pass the google sign-in process, so that my app can access the contents of the website?
Please let me know if I can clarify.
Thanks!
If choosing not to use Google API is okay, and if it is only one specific website that you would like to access, then I would suggest looking into doing this using Selenium. You can simulate the way you use the browser so the script can do it for you. Here is a tutorial on a simple login use-case that might be relevant to your problem.
Hope it helps.

How to Post to a Google Plus user page from a python script using Google+ API

I'm really confused with the process to create a post in a google plus page.
I have created a user in google plus and created a 'Page' (Business Page). Now, from a Python script i want to post to the 'Page'. So could you someone Suggest which API should i use ? Whether its Google + API Google Domain API?
I have done research and what i understood is that, its not possible to post to
a page from a script. or i'm i missing something?
I have already created a python script which can post content to facebook,Twitter and LinkedIn but stuck with Google Plus.
I have already gone through the links like
Google + Domain API
Google + API
But those does not create posts directly in a page.
Please guide me. Any help would be appreciated.
Unfortunately the Google Plus Pages api (required for working with pages) is a separate api, and is not open to the public... You can send a request to join here:
https://developers.google.com/+/api/pages-signup
I had the same problem...

How to get details and facebook albums through django app in django-scoial-auth

I have followed the django-social-auth, i am able to login with facebook ID, but how to get the details,images that are stored in facebook into my django application using django-social-auth module.
Please read this first:
http://www.tryolabs.com/Blog/2012/02/13/get-user-data-using-django-social-auth/
And then read read graph API on facebook:
https://developers.facebook.com/docs/graph-api/
All I have done so far is get a mugshot, but this was how I started.

embedding videos loaded on box

So basically we would like to integrate our platform with box.net, in particular to be able to stream videos uploaded there, since we can't unfortunately use youtube/vimeo (which support noembed).
I had a look in the doc and:
it seems that for videos the preview is only working for flv and swf.
However I tried with my personal account and one swf embedded with their embedding link didn't preview anyway.
I would like to use the API to upload videos directly from the client, but what happens if the user is not actually authenticated to box.net and the video is private (which is our requirement).
If embedding videos with box is just not going to work we can look at other alternatives, but unfortunately from the list of supported sites http://noembed.com/
it doesn't that we could use any of the services..
For the second point, you can just do all the authentication for your site via box.net. They provide authentication as part of their api: http://developers.box.com/oauth/.
When a user logs into your site, authenticate them with box.net using python requests, and a custom authentication backend, django docs here, example on stack overflow here: Django Remote Authentication without redirecting.

Categories