so I want to have a .php script that uploads an image every 3 hours to my Tumblr (via a cronjob). I used to have a working script, however since Tumblr no longer supports their v1 API I am lost. I have found no good guides on Google (http://vigrond.com/blog/2012/02/04/oauth-extension-php-and-the-tumblr-api/ doesn't do it for me since I can't install the OAuth extension) and the official Tumblr Documentation doesn't even exist.
I would be very glad if you can help me out and point me to a solution :)
I've found this would be a good start: https://gist.github.com/1649885 but I cannot seem to get the access_token / access_secret.
I've done a simple script that posts a random image, taken from a random category, each category has its own tags and captions file, so for every image posted, you can have several captions.
the script is using the tumblr api v2.
matteobononi.it tumblr random image post script
Related
I am making an app in order to post an image to LinkedIn.
The problem is that it's not working for images.
I use my uploaded image URL in submitted-image-url in order to post my image with a caption but unfortunately, it just uses a thumbnail of my image.
What can I do to post my image? By the way, I use PHP.
Currently, as of May, 2020, LinkedIn only supports the url parameter in its share URL. So, you'll have to share the image by making it a linkable file and then share the URL to the file, like so..
https://www.linkedin.com/sharing/share-offsite/?url={url}
Source: Microsoft LinkedIn Share URL Documentation.
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check us out! Social Share URLs
Through a lack of good documentation of the Facebook Graph I need your help.
I use this piece of php code to get posts form a Facebook page:
file_get_contents_curl("https://graph.facebook.com/v2.6/$pageFBID/feed?fields=full_picture,message,story,created_time,shares,likes.limit(1).summary(true),comments.limit(1).summary(true)&access_token=".$token);
This call works fine but I want to get all the images, instead of only one. Does someone know how?
I finnaly found the soluction. You have to add the 'parameter' attachments to the url to get all the images and other media attached to the post, in a large size.
file_get_contents_curl("https://graph.facebook.com/v2.6/$pageFBID/feed?fields=full_picture,attachments,message,story,created_time,shares,likes.limit(1).summary(true),comments.limit(1).summary(true)&access_token=".$token);
I'm trying to publish an image from URL with Twitter API and PHP but I can't do it.
I have seeked in many post but I could find only how to upload an image.
Is possible to do it?
As you have discovered, this is not possible.
One way around it is for you to download the image first, and then upload it.
For example
file_put_contents("temp-img.jpg", file_get_contents("http://example.com/flower.jpg"));
Then, using whichever Twitter library you have, you can post temp-img.jpgdirectly.
I'm trying to integrate the Flickr API with Jquery Gallerific. If you're familiar with Gallerific you know photos in the Gallery can have a caption. I'm trying to pull photos from a specific set from a user using flickr.photosets.getPhotos to get thumbnails. However, with this method it's not possible to get description for each thumbnail, only for the set so I'm having to run flickr.photos.getInfo for each photo in the set, which works but is pretty much useless as a page takes 10+ seconds to load. Does anyone know how to obtain flickr photos from a set with the individual description for each photo? I've looked through the API but can't seem to find anything.
Thanks in advance!
Never actually used the Flickr API but what about just loading the thumbnails initially, then using JSONP (or a custom "proxy" of sorts) to query photo information asynchronously after the page has loaded. Or, better yet, when the user actually hovers over an image.
I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie and outputs an image gallery.
I have instructed my client to upload there images into their flickr account.
The images are showing but the feed seems to be limiting to 20 images, however, there are 40 images in the stream.
I have checked the API and there doesn't seem to be any paramaters to change this.
Has anyone come across this before, can anyone help me tweak the feed so that it pulls all the images in the photostream?
Here is the Flickr Stream and feed...
http://www.flickr.com/photos/44280289#N04/
http://api.flickr.com/services/feeds/photos_public.gne?id=44280289#N04&lang=en-us&format=rss_200
It appears that they do limit it to the initial 20 photos on flickr
http://www.flickr.com/help/website/
Why do I only see 20 items in RSS
feeds?
Flickr only shows the latest 20 items
in a feed. Because of this, the first
time you connect to a feed you will
only see the most recent items. But if
your RSS reader saves items (as most
do) you will see more than 20 as the
items build up over time.
But you could potentially use the flickr api, particularly http://www.flickr.com/services/api/flickr.photosets.getPhotos.html
Which allows you to get more (You will need to get an API key however)
Edit:
Though I have not personally used it I have read/heard good things about http://phpflickr.com/ which is a flickr api wrapper for php 4 and 5
Edit 2:
Unfortunately I can not comment on your comment but if you take a look at this link from the flickr code blog
http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/
Some API responses can been provided as feeds so you could try using "&format=feed-rss_200" not sure if it includes getPhotos yet though.
It seems like you want to use the photosets.getPhotos api call. It will give you a maximum of 500 photos.
Here is an example which gives you the url of the photo in url_o
http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&extras=url_o&photoset_id=72157622766901612&api_key=[YOUR APIKEY HERE]
You need an api key to make it work.
You can also get the output as JSON directly by adding &format=json to the url.