Download original image from 500px using REST API - rest

I'm using the 500px REST API in order to retrieve information on photos, and download them.
Using the photos/:id method I'm retrieving the details of the photo.
The endpoint supports downloading the images in various sizes, via the image_size parameter (described here), however the largest image I can get is "2048px on the longest edge" (using the 2048 value).
Is there a way to download the original photo?
Note: I'm allowing users to download only their own photos, not photos of other users...

I don't think there's any way to get original image because if it was possible, developers would have built a web/mobile tool to download full-size images and no one would care about 500px Prime and buy images from 500px.

Related

Get largest image from Facebook graph api photo node

I'm using the facebook graph api v2.6. I'm accessing the photo's of a user via "me/photos?fields=images". This provides an array of various sizes of the given photo. Obviously I could just run through the list and pick the largest one but I wanted to know if there is a way to limit the results returned to the largest one to reduce the payload size since I only care about the highest resolution one.
Also, please note that "type=normal" does not return the largest image (nor does it seem to work on the photos node anyway) and the "source" field is not the largest image either and that field is depreciated anyway. Thanks.
Update: please note I am not trying to access the profile image of a user, I am trying to access the photos node of the user which is all of the photos they have been tagged in. Here is the documentation: https://developers.facebook.com/docs/graph-api/reference/v2.6/user/photos
It returns a list of photos as documented here: https://developers.facebook.com/docs/graph-api/reference/photo/
The various sized images are in the "images" field and I want to know if I can restrict that to just the largest image. It doesn't appear so in the documentation but Facebook's documentation has been historically lacking...
You want get a picture for a Facebook User?
Try this way
https://graph.facebook.com/user_id/picture?type=large

Facebook API. Change video thumbnail?

When you upload a video to facebook, it lets you specify a thumbnail you want to use out of the 10 it generates and offers you (In the edit settings). Is there a way to upload a video and have it change the thumbnail to one of their randomly generated thumbnails using the api instead of having to do it manually?
There is no way to directly tell Facebook to select one of those default thumbnails.
You can query the [api_url]/v2.3/[video_id]/thumbnails edge which gives you the 10 thumbnails that Facebook has extracted from the video, and then set one of those as the video thumb using the same edge yourself.
Refer to: https://developers.facebook.com/docs/graph-api/reference/video/thumbnails/

Primary images when Sharing page on Facebook

We have a PHP based real estate template and when we SHARE PAGE on Facebook, the resulting photos to choose from do not include the desired photo(s) to select from. IE we have 10-15 images on this page, and facebook only offers 3-4 as an option to share, none of which we want to share.
Suggestions?
Example http://kemptvillerealestate.com/listings/listing_body.php?id=118521
I have seen some cases that image size and/or aspect ratio did not satisfy Facebook's requirement and those images did not appear on users' wall, timeline or Facebook page.
The best practice is shown here and I think this is the latest one. As Facebook design including timeline, news feed and page changes this optimization practice changes accordingly. So be careful catching up the latest specifications.
So far the document describes as follows:
Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.
If your image is smaller than 600 x 315 px, it will still display in the link page post, but the size will be much smaller.
We've also redesigned link page posts so that the aspect ratio for images is the same across desktop and mobile News Feed. Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in News Feed without any cropping.
And when you update images on your pages, make sure you visit Facebook Debugger and let Facebook crawler scrape your page again so they will get the latest version of your page content. Or you can do it programmatically as stated here:
This Graph API endpoint is simply a call to:
POST /?id={object-instance-id or object-url}&scrape=true
The response from this endpoint will be a JSON object that contains all the information about the object that was scraped (the same data returned when the Object ID is read from the Graph API).

How to identify photos that were downloaded from Facebook

Is there any kind of metadata in photos that Facebook processes that could be used to figure out if a photo originated from Facebook?
For example, is there any data I could extract from a resized jpg file downloaded from Facebook using ImageMagick or some other tool?
I don't see any way to do this right now other than to guess by filename (which I don't have in this case) or by dimensions.
AFAICS there is no way to discover any special metadata or EXIF data in photos that are downloaded from Facebook.
'Originated from Facebook' (your expression) in any way is wrongly stated. People upload lots of stuff to Facebook, but that doesn't mean it originates from there...
If you can provide any sample of fotos you are thinking of, one could start investigating a bit closer....

iPhone OS: Posting an image + text "story" to a user's news feed through the facebook api

So what I am trying to do is post an image that has been created by a user on an iphone into that users newsfeed.
The functionality I am having a hard time understanding if it is possible:
Can I pass a local NSURL (or URL?)(to a png file that lives in the documents folder) through a JSON string and onto Facebook?
i want to mimic the action of a user going to his/her facebook page, clicking into the textfield for their newsfeeld, uploading an image by clicking the "photos" icon and selecting an image from a local disk and uploading it. I would also like to add some text into the post optionally.
I'm just getting started with the Facebook api and it seems pretty tough right now, any help would be appreciated. code examples appreciated.
Thanks,
Nick
You'll need to use a third-party image host like YFrog or roll your own image host. Facebook requires that all media attachments (including photos) be hosted on the public web. Even though they cache the images themselves, the URL that you send to them has to have its own public URL. Many of the popular Twitter image hosts have simple REST APIs to achieve this.
You can also use Facebook itself to host the image via their photo.upload API, if you don't mind two side-effects: it will appear in the user's photo albums, and the thumbnail is likely to appear in the stream twice (once representing the addition to the photo album, and the second in the actual stream story you publish). You can't currently get around this doubling artifact, but it will give you a stable host for the uploaded image.
Just to clarify this. I was actually able to pass and image directly from the iPhone without a third party but that was posting an image to a users photo album. There are I think two methods in the fbconnect api for posting one contains an extra argument for a data argument which can be an image. I'll post more details when I'm in front of the documentation.