Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7807831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:58:43+00:00 2026-06-02T02:58:43+00:00

I need to add a facebook like button to menu items from a php

  • 0

I need to add a facebook like button to menu items from a php cp menu –

I’m thinking of pulling in the information from each menu div and having it fill in meta data before sending it to facebook

<div class="menu_content_cell">
<span class="menu_title"><?php echo $menuItem['item_name']?></span>
<?php if($menuItem['item_desc']) {?>                                                    <br />
<span class="menu_description"><?php echo $menuItem['item_desc']?></span><?php } ?>
</div>

to fill in

      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
    <title>Sample</title>
    <meta property="og:title" content="Site Name <?php echo $menuItem['item_name']?>"/>
    <meta property="og:type" content="food"/>

    <meta property="og:site_name" content="Site Name"/>
    <meta property="og:description"
          content="<?php echo $menuItem['item_desc']?>"/>

    <meta http-equiv="refresh" content="0;url=http://www.sample.com/menu.php"/>
  </head>

<body>
</body>
</html>

is this possible, or am I barking up the wrong tree?

How would I do it? Maybe if I could get a unique id for each menu item – I’m sure this is possible but I’m struggling to piece the parts of the puzzle together

Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:58:45+00:00Added an answer on June 2, 2026 at 2:58 am

    Facebook indexes objects by urls, different urls mean different objects in their graph.

    For example, these pages will be considered different:

    • http://www.sample.com/menu.php
    • http://www.sample.com/menu.php?item=3
    • http://www.sample.com/menu.php?category=43

    And so, you should differentiate pages which you want users to like by their urls, and based on the dynamic part (either using query string or pretty urls) output different og tags on the server side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I add a FaceBook 'like' button to my master pages, does it
Well, I found this Facebook like button code from Facebook Developers page and i
I need to add facebook twitter and google +1 button to a dynamically generated
I'm trying to add facebook like button and twitter tweet button on a list,
I would like to add a Facebook like button to my asp.net page. I
I am trying to add a Facebook Like button to a widget that I
Facebook Connect and their Social Widgets documentation mention that you need to add an
I'm integrating the Facebook Like Button into a site. The likeing functionality is working
I'm having problems trying to connect my website to Facebook. What I would like
I wanted to add user search auto-complete (like Facebook's) to my Rails app on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.