Middlebury

Difference between revisions of "Facebook Integration for Drupal"

 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A few months ago, we added support for Meta Tags on Drupal nodes, which gave you access to add an optional description and list of keywords to news stories, profiles, or other content types on the site. This feature was mainly added because when you link to a page in Facebook their site will try to fetch a description for that link and, if you don’t supply one in the meta description field, it will guess. It’s not very good at guessing.  
+
A few months ago, we added support for Meta Tags on Drupal nodes, which gave you access to add an optional description and list of keywords to news stories, profiles, or other content types on the site. This feature was mainly added because when you link to a page in Facebook their site will try to fetch a description for that link and, if you don’t supply one in the meta description field, it will guess. It’s not very good at guessing.
  
We’ve now extended this in three important ways:  
+
We’ve now extended this in three important ways:
  
#You can now add meta tags to pages.  
+
#You can now add meta tags to pages.
#You can add [http://developers.facebook.com/docs/opengraph/ Facebook Open Graph] tags.  
+
#You can add [http://developers.facebook.com/docs/opengraph/ Facebook Open Graph] tags.
 
#You can add a Facebook “Like” button, which uses the Open Graph tags to give you information about the people visiting and sharing your site.
 
#You can add a Facebook “Like” button, which uses the Open Graph tags to give you information about the people visiting and sharing your site.
 +
 +
  
 
== Adding Open Graph tags  ==
 
== Adding Open Graph tags  ==
  
#Log in.  
+
#Log in.
#Click on Settings in the Edit Console.  
+
#Click on Settings in the Edit Console.
#In the middle of the page, expand the Meta Tags section.  
+
#In the middle of the page, expand the Meta Tags section.
#Enter the appropriate values for the page.  
+
#Enter the appropriate values for the page.
 
#Save the page.
 
#Save the page.
  
 
== Adding a Like Button  ==
 
== Adding a Like Button  ==
  
#Log in.  
+
#Log in.
#Click Add in the Edit Console.  
+
#Click Add in the Edit Console.
#Select Facebook Like Button from the list of options.  
+
#Select Facebook Like Button from the list of options.
#Enter the URL of the page to use for the Like button.  
+
#Enter the URL of the page to use for the Like button.
 
#Click Save.
 
#Click Save.
  
 
== Why you would do this  ==
 
== Why you would do this  ==
  
When somebody links to your page in Facebook, or when they click a Like button you have put on the page, Facebook makes a request to our website to see what the page is about. If you don’t have any Open Graph tags on the page, Facebook will try to guess what the page represents, taking its title, description, and often an image from content it finds on the page. Using Open Graph tags, you can help Facebook by removing the guess work.  
+
When somebody links to your page in Facebook, or when they click a Like button you have put on the page, Facebook makes a request to our website to see what the page is about. If you don’t have any Open Graph tags on the page, Facebook will try to guess what the page represents, taking its title, description, and often an image from content it finds on the page. Using Open Graph tags, you can help Facebook by removing the guess work.
  
You’ll also see that there is a tag to add a Facebook Admin ID. You can put a single Facebook user ID in that field, or a comma-separated list of multiple user IDs and those people will be able to use [http://www.facebook.com/insights/ Facebook Insights] to get reports on pages shared within your site. You’ll want to read over the [http://developers.facebook.com/docs/insights/ documentation on Facebook Insights].  
+
You’ll also see that there is a tag to add a Facebook Admin ID. You can put a single Facebook user ID in that field, or a comma-separated list of multiple user IDs and those people will be able to use [http://www.facebook.com/insights/ Facebook Insights] to get reports on pages shared within your site. You’ll want to read over the [http://developers.facebook.com/docs/insights/ documentation on Facebook Insights].
  
 
== <br>Where to add Open Graph tags  ==
 
== <br>Where to add Open Graph tags  ==
  
You don’t need to add Open Graph tags to every page on your site. You’ll probably want your site’s home page to have them as well as pages that you link to on your own Facebook account or page. For example, it would be good to have the tags on the Economics Department homepage, or a page describing a single event hosted by that department, but not on the distribution requirements page.  
+
You don’t need to add Open Graph tags to every page on your site. You’ll probably want your site’s home page to have them as well as pages that you link to on your own Facebook account or page. For example, it would be good to have the tags on the Economics Department homepage, or a page describing a single event hosted by that department, but not on the distribution requirements page.
  
 
== <br>Where to add Like Buttons  ==
 
== <br>Where to add Like Buttons  ==
  
You probably only need one Like button for your site. Using the Economics Department example above, they could add a Like button to the left column below the site navigation, which will then appear on every page within their site, just like the address information in that area does. But the URL for that button would always be the Economics Department homepage because that’s the value they would enter when creating the button. This way, even if someone is viewing the requirements page and clicks the button, their Facebook feed would still say “[Person] like Economics at Middlebury” with a description, title, and possibly image based off the Open Graph tags set on the department homepage.  
+
You probably only need one Like button for your site. Using the Economics Department example above, they could add a Like button to the left column below the site navigation, which will then appear on every page within their site, just like the address information in that area does. But the URL for that button would always be the Economics Department homepage because that’s the value they would enter when creating the button. This way, even if someone is viewing the requirements page and clicks the button, their Facebook feed would still say “[Person] like Economics at Middlebury” with a description, title, and possibly image based off the Open Graph tags set on the department homepage.
  
 
== <br>More Information  ==
 
== <br>More Information  ==
  
Don’t worry if this is a lot of new and confusing information! I’m still trying to figure out how best to use these features on our site. I’ll be putting together a workshop on this topic, but in the meantime if you would like to sit down for a one-on-one meeting to discuss how to best use this in your site I would be happy to schedule that. Just send me an email with a time that is convenient for you ([http://go.middlebury.edu/ian/cal here’s my schedule]).<br><br>  
+
Don’t worry if this is a lot of new and confusing information! I’m still trying to figure out how best to use these features on our site. I’ll be putting together a workshop on this topic, but in the meantime if you would like to sit down for a one-on-one meeting to discuss how to best use this in your site I would be happy to schedule that. Just send me an email with a time that is convenient for you ([http://go.middlebury.edu/ian/cal here’s my schedule]).<br><br>
  
[[Category:Drupal]] [[Category:Facebook]]
+
[[Category:Drupal]]
 +
[[Category:Facebook]]
 +
[[Category:Web Application Development]]
 +
[[Category:Public Search]]
 +
[[Category:TDXNO]]

Latest revision as of 15:47, 21 December 2022

A few months ago, we added support for Meta Tags on Drupal nodes, which gave you access to add an optional description and list of keywords to news stories, profiles, or other content types on the site. This feature was mainly added because when you link to a page in Facebook their site will try to fetch a description for that link and, if you don’t supply one in the meta description field, it will guess. It’s not very good at guessing.

We’ve now extended this in three important ways:

  1. You can now add meta tags to pages.
  2. You can add Facebook Open Graph tags.
  3. You can add a Facebook “Like” button, which uses the Open Graph tags to give you information about the people visiting and sharing your site.


Adding Open Graph tags

  1. Log in.
  2. Click on Settings in the Edit Console.
  3. In the middle of the page, expand the Meta Tags section.
  4. Enter the appropriate values for the page.
  5. Save the page.

Adding a Like Button

  1. Log in.
  2. Click Add in the Edit Console.
  3. Select Facebook Like Button from the list of options.
  4. Enter the URL of the page to use for the Like button.
  5. Click Save.

Why you would do this

When somebody links to your page in Facebook, or when they click a Like button you have put on the page, Facebook makes a request to our website to see what the page is about. If you don’t have any Open Graph tags on the page, Facebook will try to guess what the page represents, taking its title, description, and often an image from content it finds on the page. Using Open Graph tags, you can help Facebook by removing the guess work.

You’ll also see that there is a tag to add a Facebook Admin ID. You can put a single Facebook user ID in that field, or a comma-separated list of multiple user IDs and those people will be able to use Facebook Insights to get reports on pages shared within your site. You’ll want to read over the documentation on Facebook Insights.


Where to add Open Graph tags

You don’t need to add Open Graph tags to every page on your site. You’ll probably want your site’s home page to have them as well as pages that you link to on your own Facebook account or page. For example, it would be good to have the tags on the Economics Department homepage, or a page describing a single event hosted by that department, but not on the distribution requirements page.


Where to add Like Buttons

You probably only need one Like button for your site. Using the Economics Department example above, they could add a Like button to the left column below the site navigation, which will then appear on every page within their site, just like the address information in that area does. But the URL for that button would always be the Economics Department homepage because that’s the value they would enter when creating the button. This way, even if someone is viewing the requirements page and clicks the button, their Facebook feed would still say “[Person] like Economics at Middlebury” with a description, title, and possibly image based off the Open Graph tags set on the department homepage.


More Information

Don’t worry if this is a lot of new and confusing information! I’m still trying to figure out how best to use these features on our site. I’ll be putting together a workshop on this topic, but in the meantime if you would like to sit down for a one-on-one meeting to discuss how to best use this in your site I would be happy to schedule that. Just send me an email with a time that is convenient for you (here’s my schedule).

Powered by MediaWiki