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 7941307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:37:49+00:00 2026-06-03T23:37:49+00:00

I’ve created a music discovery webapp that I’m trying to integrate with Facebook. The

  • 0

I’ve created a music discovery webapp that I’m trying to integrate with Facebook. The frontend is essentially an interactive experience using HTML5’s Canvas, meaning that it all exists within one page.

I have some html code that exists over the canvas to display a facebook like button. This like button corresponds to the song that’s currently viewed in the canvas app. Using jquery, I’m dynamically changing the href of the fb:like, which works just fine. Similarly, I’m changing the URL of the site using window.history.pushState().

This works fine, except that the message that’s printed on a user’s feed when clicking the like button always pertains to the original page that was loaded (AKA the webapp without any songs loaded). As such, I started looking at using OpenGraph to alter said message.

According to facebook’s page on like buttons:

When does Facebook scrape my page?

Facebook needs to scrape your page to know how to display it around
the site.

Facebook scrapes your page every 24 hours to ensure the properties are
up to date. The page is also scraped when an admin for the Open Graph
page clicks the Like button and when the URL is entered into the
Facebook URL Linter. Facebook observes cache headers on your URLs – it
will look at “Expires” and “Cache-Control” in order of preference.
However, even if you specify a longer time, Facebook will scrape your
page every 24 hours.

As per above, I am now creating my own url’s that change dynamically (without reloading the site) each time the song is changed. I can relatively easily recode my server so that if anybody requests one of those URLs, the returned HTML file will include the meta tags that correspond to the song in question. Let’s pretend that I do this and I write a script to curl all those urls to facebook. If a user now clicks a like button on my webapp that corresponds to a given song, will the message correspond to the meta tags that were previously scraped by facebook, or would it just be the regular message that I’m receiving currently that is misleading?

Best,
Sami

PS If nobody knows the answer to this, I’ll code everything up tomorrow and let you all know.

PPS On a related note, does anybody know if using OpenGraph to alter the text of a like button click needs the scope="public_actions" attribute to be set to the fb:like element in the HTML code?

  • 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-03T23:37:50+00:00Added an answer on June 3, 2026 at 11:37 pm

    There’s no problem with what you’re doing, you just need to do two things:

    1. Have the server return the correct og meta data per url that users can share.

    2. After dynamically changing the like button container data, you need to call the FB.XFBML.parse method. I’m not sure how well it will work if you only change the href property, I would suggest that you completely remove the like button from the dom, insert a new fb:like and then call FB.XFBML.parse.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into

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.