PDA

View Full Version : Wrong images getting posted to Facebook



kgriffiths
04-22-2015, 07:31 PM
I have a custom post type that is for videos uploads. The post thumbnails are auto generated through FFMPEG after the video is encoded and they display just fine on the site. But when someone likes the video post and tries to post it to facebook, it pulls the completely wrong image. On lines 3943 through 3952 is where the post data is generated for data collection in likebtn_like_button.php. I did a var_dump on the array $entity_image_url and it shows it is the right image. So the problem is obviously in the function sending the info to Facebook, or any social link, but I cannot seem to find the line. Where is the line and in what file? I can fix this myself if I can locate the right line.

/********** 30 minutes later ***************/

I see that this info is being generated in the remote Javascript on likebtn.com. So I have done a var_dump of the $data variable right before the $markup variable start:

string(589) " data-identifier="videos_3087" data-site_id="5522bd5e3866e1c14c0acedf" data-theme="github" data-dislike_enabled="false" data-icon_dislike_show="false" data-voting_frequency="86400" data-white_label="true" data-info_message="false" data-style="" data-unlike_allowed="" data-show_copyright="" data-item_url="https://www.granite.org/videos/northwest-students-are-3/" data-item_title="Northwest Students Are..." data-item_image="https://www.granite.org/wp-content/uploads/2015/04/Northwest-Middle-School.jpg" data-engine="WordPress" data-engine_v="4.1.2" data-plugin_v="2.1.3" "

This shows the correct data-item_image, but when the Facebook window pop shows up, it is the wrong image. This is a bug in the code somewhere. Any help much appreciated.

support
04-23-2015, 09:06 AM
Hi, our Support Team try to understand problem and will help you soon as possible.

LikeBtn
04-23-2015, 12:13 PM
I have a custom post type that is for videos uploads. The post thumbnails are auto generated through FFMPEG after the video is encoded and they display just fine on the site. But when someone likes the video post and tries to post it to facebook, it pulls the completely wrong image. On lines 3943 through 3952 is where the post data is generated for data collection in likebtn_like_button.php. I did a var_dump on the array $entity_image_url and it shows it is the right image. So the problem is obviously in the function sending the info to Facebook, or any social link, but I cannot seem to find the line. Where is the line and in what file? I can fix this myself if I can locate the right line.

/********** 30 minutes later ***************/

I see that this info is being generated in the remote Javascript on likebtn.com. So I have done a var_dump of the $data variable right before the $markup variable start:

string(589) " data-identifier="videos_3087" data-site_id="5522bd5e3866e1c14c0acedf" data-theme="github" data-dislike_enabled="false" data-icon_dislike_show="false" data-voting_frequency="86400" data-white_label="true" data-info_message="false" data-style="" data-unlike_allowed="" data-show_copyright="" data-item_url="https://www.granite.org/videos/northwest-students-are-3/" data-item_title="Northwest Students Are..." data-item_image="https://www.granite.org/wp-content/uploads/2015/04/Northwest-Middle-School.jpg" data-engine="WordPress" data-engine_v="4.1.2" data-plugin_v="2.1.3" "

This shows the correct data-item_image, but when the Facebook window pop shows up, it is the wrong image. This is a bug in the code somewhere. Any help much appreciated.

See http://likebtn.com/en/faq#sharing

kgriffiths
04-23-2015, 02:56 PM
See http://likebtn.com/en/faq#sharing

So basically your plugin which I paid for a year for on your ULTRA plan can't do one of the most prevalent functions correctly? I have to fix the code because you are selling a broken plugin?

kgriffiths
04-23-2015, 05:25 PM
So I fixed your coding so any social media will pull the correct information. The necessary piece of coding should have been included in your plugin to begin with. It only took 20 minutes of placing it in.

I would share it with others on the site, but your response of just pointing me to a site was not the helpful response or action you should have taken.