API Blogger - Display image on mobile - php

I've got a problem by using the Blogger API in PHP. When I publish an article with a picture on Blogger by using API, the picture appeared correctly on desktop version of my blog but no on mobile.
For example:
I send the following article on Blogger
<p><img src="https://cdn.pixabay.com/photo/2018/10/03/21/13/mushroom-3722395_960_720.jpg" /></p><p>Test</p>
On the index of my Blogger on Desktop, the pictures are correctly displayed:
Index Blogger on Desktop
I open the same page on mobile, and all pictures have disappeared:
Index Blogger on Mobile
I noticed that URL generated by Blogger are differents on mobile and desktop.
By inspecting element, the URL on mobile is exactly the same that I've sent thanks to the API (ie: https://cdn.pixabay.com/photo/2018/10/03/21/13/mushroom-3722395_960_720.jpg).
On desktop, the URL is totally different:
https://lh4.googleusercontent.com/proxy/...
If I edit the post directly on Blogger and if I replace the original URL (https://cdn.pixabay.com/photo/2018/10/03/21/13/mushroom-3722395_960_720.jpg) by the URL generated (https://lh4.googleusercontent.com/proxy/...), the picture appeared correctly on mobile!
Have you got an explanation? How I can display pictures on mobile by using this API?

Your blog uses two templates now one for desktop and other for mobile. The mobile template is one of old default blogger mobile templates which allow showing images that hosted on blogger only. Images hosted on blogger can be easily resized by change some values in image URL, that cannot be done with images hosted away off blogger.
Now you have to change mobile template and aplly the desktop template to cover both desktop and mobile.

Related

Upload Images using Blogger Post Image API

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)

LinkedIn share API issue

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

Facebook Embedded Post: force mobile view

i've created a web platform where you can insert 'facebook embedded posts'.
Facebook Embedded Posts Docs
As you can see, i can show a post on my pages simply with
<div class="fb-post" data-href="{your-post-url}"></div>
With this tag, you can show a post in Desktop version: from 350px to 750px width.
The mobile view will be used automatically only on mobile devices. Docs says: "On mobile web, Embedded Posts automatically scale to the width of the container."
The problem is that i'd like to show these posts in their mobile version also on desktop view.
I've tried changing the browser's user agent, but probably i'm doing something wrong. Any idea?
Thanks!

How can I share images , video and text on facebook , twitter and google plus from my webpage?

I am working on http://www.ididthisfilm.com/lex_tmp2/thelist/ webpage. There are some videos , images and text on this page. I want to share these contect from this page to facebook , twitter and google plus. Right now I am using plugin add to any to share this. But with plugin i am only able to share title of the page and url of the page. I want to share Images and video and text individually. Please Help.
as per my knowledge I'm never come across any kind of plugin which will allow you to share specifically the page contents and not the full page itself. Whatever social share plugin present in WordPress free plugin repository, it will only allow you to share the page or post itself, not any element within it.
Beside the only content sharing plugin I've seen is this jQuery Pin It Button For Images (Link: https://wordpress.org/plugins/jquery-pin-it-button-for-images/) which will show you a pin button whenever you hover on any images present on your site.
If you want to share specific contents of your page/post, I will suggest you to copy the link and then use HootSuite to one click share to every social media.
Hope this helps.
As I know Facebook, twitter, Sprybirds and google+ uses the meta tags to share the content of a webpage. Facebook uses Open Graph. An example of meta tag uses by facebook for image is <meta property="og:image" content="your-image-path.jpg"> and by twitter <meta name="twitter:image:src" content="your-image-path.jpg">. You only can share contents on these sites which are available in meta tags.You can not share all the page. If you are using wordpress for website or blog then you can use available plugins like all-sociable and otherwise you have to create your own plugin.
If you want to create own buttons to share contents on These sites then you can do these things.
For Sprybirds
For Facebook
For Google Plus
For twitter
Where "PUT-PAGE-URL" is the url of that page from which you want to share the content on these sites. The content of this page will share on these sites.
Request If you are planning to put these buttons and my answer is helpfull for you please don't forget to also create our social networking website Sprybirds.com button on you website.
List item

Facebook photo gallery widget for my website?

Is there a widget to get all albums and photos from a facebook page and display them in a simple grid on my website?
Preferably, the widget would use PHP, JavaScript, or a combination.
I have a client who wants to display all the pictures found on their facebook business page on their website. I could manually download and upload each picture from facebook to his website, but I figured this would be a good place to use Facebook's api.
Here is a simple widget. Created it in about 3 hours so its not perfect but it works.
There is no CSS styling either so you can easily style it up.
https://github.com/zechdc/Facebook-Photo-Gallery-Widget
I'm assuming that you want the page to display images that are currently on the page, so when the photos are updated on the business page the website is also updated?
If so see this below tutorial:
http://www.codeofaninja.com/2011/06/display-facebook-photos-to-your-website.html
Looking at the reference to their Graph API it doesn't look to hard, all you need is a photo album id and you can get the photo album as a JSON object:
https://graph.facebook.com/99394368305 (Coca-Cola's wall photos)
You can try SlideshowFx plugin (http://www.oopstouch.com) proposed for Joomla and WordPress.
Initially based on Picasa, they port the plugin to Flickr and Facebook.
A lot of option available.
Check demo here: http://www.oopstouch.com
Regards,
Joël
I use this super duper quick solution. Just replace "{FACEBOOK-PAGE-ID-HERE}" with your facebook page id.
<iframe src="http://facebookgalleria.com/gallery.php?id={FACEBOOK-PAGE-ID-HERE}" scrolling="no" marginheight="0" frameborder="0" width="551" style="height: 769px;"></iframe>

Categories