Topic-icon Need OpenGraph Help

Active Subscriptions:

None
11 years 4 months ago #50259 by Rick1100
Need OpenGraph Help was created by Rick1100
Hi,
I am trying to setup OpenGraph to help share pages, but it seems a bit complicated.
My website is for classifieds, and I currently have it setup to automatically post new listings to facebook. (Using RSS)
pacqc.com
The problem is that when a page is posted to facebook, instead of having the title and photo of the listing, I only get the main site name and no photo.

I was hoping I could use OpenGraph to fetch the listing title and photo to post it nicely to facebook.

Thanks for your help!
The topic has been locked.
Support Specialist
11 years 4 months ago #50265 by alzander
Replied by alzander on topic Need OpenGraph Help
Open Graph is meant to let you set the title, description and image (and other data) to make your preview posts even better. JFBConnect includes some Open Graph plugins to automatically detect the best data to use in various extensions, so, for instance, your Joomla articles can be scanned and have the first image always set as the Open Graph image to use.

If we don't have an Open Graph plugin for the extension you're using, you can always manually set the tags for a page with the following Easy Tag:
{SCOpenGraph image=http://yoursite.com/link-to-image.jpg}
That tag can be inserted into the layout file for whatever extension you're using as well and use some PHP tags to automatically set the image using information from the extension as well.

I hope that helps explain, but if you have any other questions, just let me know.

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

None
11 years 4 months ago #50276 by Rick1100
Replied by Rick1100 on topic Need OpenGraph Help
Thanks Alex!

That clears it up a bit.

So if I used this:
{SCOpenGraph title=<?php echo $page_title?>}

In the layout file, Facebook should pick it up when sharing the page?

Could I set that specific code as default for the whole site in the JFB component?

Thanks for your help
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #50277 by Rick1100
Replied by Rick1100 on topic Need OpenGraph Help
Actually my problem might be different than I thought.

If you paste this link:
transactiondirecte.com/index.php?option=...ils&id=31&Itemid=183

Into this tester:
coveloping.com/tools/open-graph-tag-tester

You get the image, the title, description and everything.
Yet when I post the same link to facebook, I get no image and just the site name as a title and description...
The topic has been locked.
Support Specialist
11 years 4 months ago #50278 by mel
Replied by mel on topic Need OpenGraph Help
Yes, the above code should work to set the og:title tag.

To expand on what Alex mentioned, there are a few different ways to set the Open Graph tags on the page:
1. Through our Open Graph plugins (as mentioned)
2. Through the Open Graph easy tags (as mentioned)
3. Through the JFBConnect > Open Graph > Configuration > Defaults setting. From here, you can set a default that will be used on pages where #1 and #2 are not found.
4. JFBConnect also attempts to automatically set some values for the following from values in the metadata/Joomla config: url, title, description, type, locale, site_name.

Since the $page_title variable is PHP and needs to be executed for each page, you couldn't put this in the default area mentioned in #3. However, you could do a template override for whatever article component you're using and add the JFBCLogin easy-tag there. This way, you wouldn't have to go into each article to add it.

I hope this helps explain a little further, but if you run into issues when you're adding the Open Graph tags, please let us know.

-Melissa
The topic has been locked.
Support Specialist
11 years 4 months ago #50279 by mel
Replied by mel on topic Need OpenGraph Help
We cross-posted, so my response to:

Actually my problem might be different than I thought.

If you paste this link:
transactiondirecte.com/index.php?option=...ils&id=31&Itemid=183

Into this tester:
coveloping.com/tools/open-graph-tag-tester

You get the image, the title, description and everything.
Yet when I post the same link to facebook, I get no image and just the site name as a title and description...


If you run the URL on our site socialdebug.com too, you will get the valid image, description, etc. That is good and means that your Open Graph tags are set up on your page correctly. However, Facebook is having a hard time connecting to your site to scrape. When I used the Facebook Open Graph Debugger, there was a warning that Facebook had not scraped your page yet. When I fetched the new scrape information there, I get a Curl/Encoding Error.

Could you try the tips in our Common Support Questions for "My Share Preview is incorrect" at www.sourcecoast.com/jfbconnect/docs/common-support-questions/ specifically pay attention to step 3, as the error I see after the re-scrape is usually caused by GZip. Let me know if this helps to resolve your issue.

-Melissa
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #50280 by Rick1100
Replied by Rick1100 on topic Need OpenGraph Help

mel wrote: Could you try the tips in our Common Support Questions for "My Share Preview is incorrect" at www.sourcecoast.com/jfbconnect/docs/common-support-questions/ specifically pay attention to step 3, as the error I see after the re-scrape is usually caused by GZip. Let me know if this helps to resolve your issue.

-Melissa


Yes yes yes, I disabled Gzip and cleared the site's cache and it works like a charm now!
Thanks so much!
The topic has been locked.
Support Specialist
11 years 4 months ago #50281 by mel
Replied by mel on topic Need OpenGraph Help
Great! Glad that could get you going. If you run into any further problems, please let us know.

Finally, if you haven't already, please consider leaving a review for JFBConnect on the Joomla Extension Directory. While it's absolutely not required, we'd certainly appreciate it.
extensions.joomla.org/profile/profile/details/76998#extensions

-Melissa
The topic has been locked.