Is possible to import pictures from twitter (not profile picture)using their API.I mean pictures attached in the tweets.
Help is highly appreciated,
Thanks.
Something like this would probably help you.
https://twitter.com/statuses/user_timeline/USERNAME.xml?count=100&page=1
Pictures aren't attached to tweets, but the URL to the images are. One thing that will make it easier is to use API calls that include entities. The URL entities are copies of the URL that are extracted from the tweet. You can look at the file extension to figure out whether the URL is to an image. Then write the code to read the image data from the URL.
Related
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 would like to add image posts to a website much like Imgur.com
So especially the Image-Text-Image-Text or Text-Image-Image-Text-Image style..
If it was simply Image-Text then I would just have a database table with pictures and their respective captions but this can be any order..
How would I structure a random order of text and pictures in the database while supporting Markdown? A simple push in the right direction is probably enough!
I may be misunderstanding the question but...
If you're looking to upload images to Imgur using your own software/php script, you're going to want to use the Imgur API. You'll have to Register Your Application before you can make use of it.
I was wondering what kind of method I could use to directly embed videos or pictures contained in twitter tweets directly ... For example .. below is a tweet from OBAMA
President Obama: "Right now, we have a real chance to reduce gun violence in America." http://t.co/tmCoUsPyyB #TimeToAct
The link that starts with htttp:// could be a picture .. How can I actually program it so that tweets are directly displayed with the images from the urls ? I know PHP and I used the twitter API before , but I dont know how I could easily achieve that . Any help would be appreciated
The first step would to to pull the URLs of of the block of text, there is another question that points you how to solve this: Extract URLs from text in PHP
You can then use Embedly or a service like it to pull the metadata associated with that url. Here is an example of the meta data that Embedly will return: http://embed.ly/docs/explore/oembed?url=http%3A%2F%2Ft.co%2FtmCoUsPyyB
The html attribute is what you want to render on your page.
We also have a PHP library you can use as well.
Hope that helps!
Can anyone advise on a great image gallery that's dynamic, client side.
Basically what I want is on my website a gallery with multiple albums and images in the albums. To be able to add images dynamically to the folder or remote site (such as Photobucket or Picasa) and the webapage to be able to display them dynamically without any further coding, avoiding the hassle of having to add a lines of code ever time a new image is added.
Anybody using something like this or can point me in the right direction?
Much appreciated.
I found what I was looking for in Picasa Webalbum Integrator javascript library.
http://code.google.com/p/pwi/
I'm trying to get a thumbnail of flickr pictures in PHP.
All I saw was this in their API:
http://www.flickr.com/services/api/misc.urls.html
Which is a overkill. In instagr.am/twitpic and others I found a very easy way of doing so (just adding to the url the request).
Is there an option with flickr I'm missing?
If you have the URL to the Flickr image, all you have to do is modify the suffix to get a different size of the photo. For example:
http://farm1.staticflickr.com/2/1418878_1e92283336_m.jpg
This URL loads the medium sized photo. If we simply change the _m to _t, we would get the thumbnail:
http://farm1.staticflickr.com/2/1418878_1e92283336_t.jpg
You can also use s for small, z for medium, and b for large.
You could just use a PHP wrapper around Flickr API and keep it simple - http://phpflickr.com/
You can parse the photo's ID out of the URL and get the thumbnail URL via flickr.photos.getSizes. This is likely how Twitpic/Instagram handle it.
For future readers, flickr doesn't support the simple functionality that other photo sharing services does. So the answer to my question is you can't.
If you know the username of the flickr user you can try to use this small bot. It uses the feed to retrieve the last images of the user, so it works only on the last images... I hope it will help you.