Microsoft Graph API - Request photo from user by size - microsoft-graph-api

I want to get user photos with a specific size.
Reading GraphAPI Docs my request should look like this:
https://graph.microsoft.com/beta/me/photos/48x48/$value
This is working perfectly fine and I'm getting the photo in my desired size. Unfortunately it is only working for 'me' and not for other users. For example the request
https://graph.microsoft.com/beta/users/{email}/photos/64x64/$value
returns the image in its full resolution. Is this a Graph API bug or am I doing something wrong?

This is currently a known issue with accessing group photos using application permissions and its documented. So it will work for delegated permissions only.

Related

Using Instagram Basic Display API to get user's metadata

I am currently working on an iOS-App where Instagram users can fetch their data, such as profile information and images and will be able to post. There are similar apps like Flume (https://flumeapp.com/) which are capable of accessing those features. I already managed to get the access token and fetch the basic user information.
As the Instagram Legacy API will be shut down soon, I am wondering how to fetch detailed user information, as the Basic Display API only lists fields for account type, id, username and media count (https://developers.facebook.com/docs/instagram-basic-display-api/reference/user#fields).
In both the Basic Display API as well as the Graph API it says that creating media is not supported.
Can anyone tell me how other apps (like Flume) are able to perform those actions? Are they perhaps still using the Instagram Legacy API?
Thanks!

Fetching media by urls with Rest API

I would like to retrieve media inside statuses, but as I could read in the docs:
For media in direct messages, media_url_https must be accessed via an
authenticated twitter.com session or by signing a request with the
user’s access token using OAuth 1.0A. It is not possible to directly
embed these images in a web page
Now my question is, how to do that kind of request using Java API? or however what is the correct request with RestAPI, using App only auth?
another question: what is the difference for media in direct messages and media shared in Tweets? how can I see the difference inside json object representing a status?
what is the difference for media in direct messages and media shared in Tweets?
If an image is posted to a Twitter timeline, any Internet user can see it. For example on this Tweet the image is available to anyone, whether or not they're logged into Twitter. See https://pbs.twimg.com/media/CSGwFynWoAA2GGG.jpg
If an image is posted into a Direct Message, it is only possible for the sender and receiver to see the image. In order to enforce that, the user must either be signed in to their Twitter account, or send a signed request via an app.
For example, this image can only be seen by me & the person I sent it to https://ton.twitter.com/i/ton/data/dm/639737026624024579/639737026682691584/tg-4St-1.jpg
how can I see the difference inside json object representing a status?
The only difference (other than the API call you used to get the data) is the URl of the media. In a DM it starts with ton. e.g.
media_url": "https://ton.twitter.com/1.1/ton/data/dm/......
Whereas in a normal Tweet, it will look like e.g.
"media_url": "http://pbs.twimg.com/media/.......
Now my question is, how to do that kind of request using Java API? or however what is the correct request with RestAPI, using App only auth?
If the user is already logged in to Twitter, they will be able to download the image. For example, if you have written a web-app and the browser already contains the Twitter cookies etc.
If not - or you're using an app - you will need to sign the request on the user's behalf.
For REST - you need to send OAuth headers with the request. There's example code in the Twitter documentation
The extra header will look something like
Authorization:
OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog",
oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg",
oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1318622958",
oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
oauth_version="1.0"
For Java, I'd suggest you take a look at how Twidere does it.

how to get the photos from a Facebook page using graph explorer?

Well, I have a Facebook page. It has photos in it. I want the graph explorer to get the photos from it. I am able to get into the page and albums but not the photos. The response which given by the Graph explorer is JSON. I want that JSON to be used in my application.
What part of
/{your_page_id}/photos/uploaded
is not working for you? See https://developers.facebook.com/docs/graph-api/reference/v2.0/page/photos

How to fetch videos by geolocation with the Youtube API v3?

This maps api answer says
Please note you can also use the YouTube API to fetch geolocated
videos to create your own customized YouTube Layer, with filters and
so forth.
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3204#c9
Which API request can be used to fetch videos by location? I checked the docs, but I cannot find it.
I believe this: https://developers.google.com/youtube/2.0/developers_guide_protocol#locationsp is what you were talking about, note how it says "Not working. This API parameter is temporarily disabled. See the API issue tracker for more information."
Edit: According to https://code.google.com/p/gdata-issues/issues/detail?id=4234 it will be fixed "In the second half of 2013"

Where should I post photos to get Facebook id and to be able to like them from iOS application

Here is my task. I have some images/photos, you can view them in my application also you should be able to like/unlike them and see how many other people have already like. I use iOS SDK for logging in with Facebook credentials.
To like some object or get it likes number you should have some facebookID. So my question is where should I post my images to get that ID?
I have found two ways of solution my task.
First one is to use iOS Facebook SDK. Then you have to post your photos and video somewhere to get IDs. I use special facebook page to contain all my content.
The other one is to use Facebook Open Graph. For this approach each content item should have a separate page with facebook tags. To like is you should use POST request like this:
me/og.likes?object=http:\\url.to.your.content.item

Resources