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.
Related
Is there any way to upload images using blogger API? (https://developers.google.com/blogger/docs/3.0/using)
I have a web developer who is going through trouble to integrate Blogger API for uploading images to my site. I thought if I could be of any help at all to him.
Normally using Picasa the images upload to googleusercontent like this :
Link to a picasa image
But what I want is for it to be uploaded to this :
Link to a image uploaded from Blogger post
The developer is using PHP. I tried searching many sites but with no luck for a working version.
Any help is appreciated thanks.
The images uploaded to Blogger directly via the website (having the URL format of x.bp.blogspot.com) are also saved on Picasa behind the scenes.
The domains used by these images (like lh3.googleusercontent.com, 3.bp.blogspot.com ,1.bp.blogspot.com,2.bp.blogspot.com,4.bp.blogspot.com) are interchangeable in nature and all of them serve the same image.
For example, the image that is using the googleusercontent URL (For testing purpose, I uploaded an image using the Official Blogger Android app) -
https://lh3.googleusercontent.com/-VESDEmEh7EM/WpCZ_8qD_wI/AAAAAAAAYs0/XDWkxkEz7EUrGUBmpTSEKBGiynGrEKOygCHMYCw/s640/1519426035853.jpg
Can also be accessed by using bp.blogspot.com URLs, like -
https://4.bp.blogspot.com/-VESDEmEh7EM/WpCZ_8qD_wI/AAAAAAAAYs0/XDWkxkEz7EUrGUBmpTSEKBGiynGrEKOygCHMYCw/s640/1519426035853.jpg
If you still want to exclusively use the x.bp.blogspot.com format URLs for images in the Blog post, you can write a custom logic in your PHP application to replace all references of lh3.googleusercontent.com (that you got after uploading the images via Picasa API) with x.bp.blogspot.com URLs before creating the post via the API)
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
i made a script to upload videos to youtube from a folder on my server, but now i want a way to control the overlay ads. i saw a video that has just like what i want.
here is the video link:
http://www.youtube.com/watch?v=_v0JoEarI8s
is there any way to do that?
I think that the Call-to-Action overlays can not be managed from the API
https://groups.google.com/forum/?fromgroups=#!topic/youtube-api-gdata/wyUoI9S2c0M
Apparently can only be configured manually
http://support.google.com/youtube/bin/answer.py?hl=en&answer=150471
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.
Has anyone had success using Flickr to embed images that users can upload to my site, but that are hosted on Flickr?
Is something like this possible?
Thanks,
Alex
There is a flikr upload API:
http://www.flickr.com/services/api/upload.api.html
Have them upload their photos to your site, you can crop it or re-size it programatically with GD or imagemagick as needed, then use the flikr upload API to put it on your flickr account, then delete the original to save space, then embed it on the site.
This will save space for you. While also preventing your users from needing to get an account on another site, or having to leave your site to post photos, or figuring out how to link them back.