Topic-icon Help with OpenGraph Plugin

Active Subscriptions:

None
5 years 6 months ago - 5 years 6 months ago #64650 by Dayo
Hi,

Having some funnies with my OpenGraph output with Easy Blog.

For example, I have something like the following added to an article
{SCOpenGraph key=keyVal twitter:card=player} 
{SCOpenGraph key=keyVal twitter:player=https://www.youtube.com/embed/AbCxYz?rel=0&showinfo=0} 
{SCOpenGraph key=keyVal twitter:player:width=640} 
{SCOpenGraph key=keyVal twitter:player:height=390} 

{SCOpenGraph key=keyVal og:video:url=https://www.youtube.com/embed/AbCxYz?rel=0&showinfo=0} 
{SCOpenGraph key=keyVal og:video:secure_url=https://www.youtube.com/embed/hW0y05v4R9E?rel=0&showinfo=0} 
{SCOpenGraph key=keyVal og:video:width=640} 
{SCOpenGraph key=keyVal og:video:height=390} 
{SCOpenGraph key=keyVal og:video:type=application/x-shockwave-flash} 

{SCOpenGraph key=keyVal title=My Title} 
{SCOpenGraph key=keyVal description= https://youtu.be/AbCxYz My Description} 
{SCOpenGraph key=keyVal image=https://i1.ytimg.com/vi/AbCxYz/hqdefault.jpg} 
{SCOpenGraph key=keyVal og:image:width=480} 
{SCOpenGraph key=keyVal og:image:height=360}

But when the article is published, I end up with ....
  <meta name="twitter:card" content="summary_large_image"/>
  <meta name="twitter:site" content="@TwitterHandle"/>
  <meta name="twitter:creator" content="@TwitterHandle"/>
  <meta name="twitter:title" content="My Title"/>
  <meta property="og:title" content="My Title"/>
  <meta name="twitter:description" content="Some Text From Article"/>
  <meta property="og:description" content="Some Text From Article"/>
  <meta name="twitter:image" content="//mysite.com/images/easyblog_images/0/hqdefaul_20180928-093004_1.jpg"/>
  <meta property="og:image" content="//mysite.com/images/easyblog_images/0/hqdefaul_20180928-093004_1.jpg"/>
  <meta property="og:image:width" content="480"/>
  <meta property="og:image:height" content="360"/>
  <meta property="og:url" content="https://mysite.com/menu/page-permalink"/>
  <meta property="og:type" content="article"/>
  <meta property="fb:app_id" content="MY FB ID"/>
  <meta property="og:locale" content="en_gb"/>
  <meta property="og:site_name" content="mysite.com"/>


Any idea why the stuff for the player is disappearing and overwritten by the other stuff?
The output is "Correct" but would like the player stuff to show instead. I think I might have two separate plugins fighting each other but can't find any other one that would be doing this installed.

BTW, around Line 180 in /plugins/opengraph/easyblog/easyblog.php, seems there is a botched attempt to comment out the "Item Author" code block.
Last edit: 5 years 6 months ago by Dayo.
The topic has been locked.
Support Specialist
5 years 6 months ago #64658 by alzander
Replied by alzander on topic Help with OpenGraph Plugin
That is strange. So none of the tags you entered get turned into meta tags? JFBConnect comes with our Social Toolbar that should show to administrators in the lower left of each page. One of the buttons in that toolbar is 'Social Meta' which will show all the tags that JFBConnect saw and what it tried to do with them. All the tags above should be shown in the 'Inserted' section, meaning that they were added to the page.

If JFBConnect thinks they were inserted, but they aren't actually in the output, it means some other extension is being very aggressive in removing OG tags (it's understandable to remove ones they are going to overwrite, but to remove the video tags seems very excessive). Alternatively, there could be something in your template that's causing our tag insertions to be ignored. Either way, the social toolbar is the place to start to determine if they were inserted, skipped or removed along with the reason given for why that action was taken.

BTW, around Line 180 in /plugins/opengraph/easyblog/easyblog.php, seems there is a botched attempt to comment out the "Item Author" code block

I'm unsure why you say this is a botched attempt? It does start with /*// Item Author, but the /* means to ignore anything after that, so the additional line-comment starting with // is ignored. That whole block of ~6 lines of code is commented out and not executing.

I hope that helps, but let us know whatever you find out.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
5 years 6 months ago - 5 years 6 months ago #64668 by Dayo
Replied by Dayo on topic Help with OpenGraph Plugin
Thanks for getting back.

On the commented out code, I guess it wouldn't execute as it is as you said. It didnt show as commented out in my editor because of the "/*//" first line but I suppose the PHP parser would understand this. I edited it to "/* //" just in case.

I would look in detail to try to figure out what is going awry with the meta tags. The Social Toolbar used to work but is currently not working for me as the "Social Meta", "Create Post" and "Activity" are non responsive as in nothing happens when they are clicked. The "Preview" button on the other hand does respond and redirect to Socialdebug.com but when this is done from an article page, the redirect page gives an error message saying "There was an error processing this URL". Works with the front page though.

Anyway, I can see I just have to patiently work my way through things.
Last edit: 5 years 6 months ago by Dayo.
The topic has been locked.
Active Subscriptions:

None
5 years 6 months ago - 5 years 6 months ago #64669 by Dayo
Replied by Dayo on topic Help with OpenGraph Plugin
Hi,

Looking at the HTML source, it seems that the tags may have been inserted by OpenGraph.
<div id="social-meta" style="position:fixed; bottom:45px; display:none;">
	<h3>Inserted</h3>
	<div>
		<p>
			<table class="table table-striped" width="90%">
				<thead>
					<tr>
						<th width="10%">Inserted Tag</th>
						<th width="70%">Value</th>
						<th width="20%">Origin</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>twitter:title</td>
						<td>My Title</td>
						<td>Open Graph - Easyblog Plugin</td>
					</tr>
					<tr>
						<td>og:title</td>
						<td>My Title</td>
						<td>Open Graph - Easyblog Plugin</td>
					</tr>
					<tr>
						<td>twitter:description</td>
						<td>TSome Text From Article</td>
						<td>Open Graph - Easyblog Plugin</td>
					</tr>
					<tr>
						<td>og:description</td>
						<td>Some Text From Article</td>
						<td>Open Graph - Easyblog Plugin</td>
					</tr>
					<tr>
						<td>og:image</td>
						<td>https://mysite.com/images/easyblog_images/0/hqdefaul_20180928-093004_1.jpg</td>
						<td>Open Graph - Easyblog Plugin</td>
					</tr>
					<tr>
						<td>og:url</td>
						<td>https://mysite.com/menu/page-permalink</td>
						<td>Auto-generated</td>
					</tr>
					<tr>
						<td>og:type</td>
						<td>article</td>
						<td>Auto-generated</td>
					</tr>
					<tr>
						<td>fb:app_id</td>
						<td>MY FB ID</td>
						<td>Auto-generated</td>
					</tr>
					<tr>
						<td>og:locale</td>
						<td>en_gb</td>
						<td>Auto-generated</td>
					</tr>
					<tr>
						<td>og:site_name</td>
						<td>mysite.com</td>
						<td>Auto-generated</td>
					</tr>
				</tbody>
			</table>
		</p>
	</div>
	<h3>Skipped</h3>
	<div>
		<p>
			<table class="table table-striped" width="90%">
				<thead>
					<tr>
						<th width="10%">Inserted Tag</th>
						<th width="70%">Value</th>
						<th width="20%">Origin</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>og:title</td>
						<td>Page Title</td>
						 <td>Auto-generated</td>
					</tr>
					<tr>
						<td>twitter:title</td>
						<td>Page Title</td>
						<td>Auto-generated</td>
					</tr>
					<tr>
						<td>og:description</td>
						<td>Some Text From Article</td>
						<td>Auto-generated</td>
					</tr>
					<tr>
						<td>twitter:description</td>
						<td>Some Text From Article</td>
						<td>Auto-generated</td>
					</tr>
				</tbody>
			</table>
		</p>
	</div>
	<h3>Removed</h3>
	<div>
		<p>None</p>
	</div>
</div>
<div id="social-post-container" style="display:none"></div>
<div id="social-autopost" style="position:fixed; bottom:45px; display:none;">
	<div>
		<p>
			<table class="table table-striped" width="90%">
				<thead>
					<th>ID</th>
					<th>Type</th>
					<th>Channel Provider</th>
					<th>Channel Type</th>
					<th>Response</th>
					<th>Created</th>
				</thead>
				<tbody></tbody>
			</table>
		</p>
	</div>
</div>
Last edit: 5 years 6 months ago by Dayo.
The topic has been locked.
Active Subscriptions:

None
5 years 6 months ago #64671 by Dayo
Replied by Dayo on topic Help with OpenGraph Plugin
Basically Solved.

1. The SCOpenGraph tags were being stripped out beforehand. Not yet exactly sure where or by, but I think I can handle this now.
2. The Social Meta and stuff not working was due to CORS issues which I have now resolved,
The topic has been locked.
Support Specialist
5 years 6 months ago #64675 by alzander
Replied by alzander on topic Help with OpenGraph Plugin
Awesome! I'm glad to hear you were able to resolve the issues. I'm not sure why the tags were being stripped either, but if you need any further assistance debugging or investigating this issue, please let us know.

Thanks,
Alex
The topic has been locked.