Facebook Like Button Grabbing Content From Wrong Page - javascript

On my site, I've implemented some facebook like buttons on the articles which works for all of them but one. If you 'like' an article, such as this one then it works fine and grabs the right image, right content and puts them on my facebook profile. However, when I 'like' this one it grabs the content and the url of the home page, made worse by the carousel on the homepage which means that it gets content from that and not even the intro text there.
This has been driving me crazy. Please help me.

Next time this happens, use the Facebook Linter tool to debug it and clear any info Facebook has cached. I did this for your URL and it should be working now.

Related

Make Google Bot detect AJAX contents

I'm developing a site (not mine) and I encountered a big trouble!
In this website I've got some modals that will open after a user clicks on a product, but I need to do so Google Bot detects these modals like pages. When a modal opens, a JS Function adds a # parameter to the URL like "#abc=modal_one".
I want that in Google Result appears this page as "www.test.com/page.php?#abc=modal_one". I've tried (and I'm trying) to render the page like Google Bot in Google Search Console, but GSC opens only the page and not the modal. I also added a ES6 (JS) code that just edits the page title when the modal is showing to the user (after user clicks to open the modal) but nothing, Google does not detect the page title set after the page is loaded.
If you can't understand something just tell me and I will try to explain my trouble newly.
Thanks in advance to all the StackOverflow community :)
Try exporting the various pages to a dynamic sitemap that Google can read.
View the Categorize parameters with the URL Parameters tool page for more information.

redirect link from facebook to website - javascript?

I have articles posted on facebook from my website http://juniorgoldreport.com/
the website is made in wordpress, and I've also created a "Welome" landing page where I want most new users to be directed too.
I have no idea where I can find information on how to do this, even after countless efforts of googling.
To give an exact idea of what I' trying to create...
Where someone clicks on an article on facebook, it'll take them to the "welcome" sign up page, then have a link on it to the article that they clicked on. The link would change depending on what article they clicked on so they can be redirected properly.
I know I can just hard code it, and create multiple landing pages with different links in relation to the article posted, but this just seems inefficient.
Does anyone know how to go about doing this?
this is the landing page
http://juniorgoldreport.com/welcome/
You can try using Javascript, as it would be much easier than creating several webpages. At the point in your page where you want a link to be placed, put something like
<p id="mynewredirectlink">Hey!</p>
And then at the bottom of your code, add some javascript to resemble this:
<script type="text/javascript">
if (document.referrer === "facebooklink.com")//Where did you come from?
$("#mynewredirectlink").innerHTML = "Hey!" //Where are you going?
Then include the other sites you need, and close it with
</script>
There may be some sites that have varying parts, like an id, so if you need to, you can use (document.referrer.includes("facebook.com")) instead.
You can convert your landing page into a fullscreen modal popup. So every new visitor will see the popup when the visit the site or any article. They can fill the form / they can close it to see the article. There is already several plugin for modal popup / newsletter popup. You just need to do a little bit css to make it full screen.

Google maps not showing when clicking on href link

I have integrated google maps in one of my web app page(Say, pageA). Web app is implemented in RoR and I am working on localhost/development phase for now.
Interesting thing is that google map does not display correctly when I reach to pageA by clicking on some href link but it displays correctly when I refresh the page(pageA)
I do not know in which direction I should start by debugging. Is it browser or cache or something else?
I hope that code part does not have anything to do with this problem since it is opening while refreshing the page. Having said that, I would be happy to share the code part in case someone want to have a look at it.

Simple Facebook "Share Link"

I am working on a site where posts are made and I'd like to give visitors the ability to "share" a particular post that they link on their timeline. I have never done any social media integration, but I followed the instructions via the FB API and am still having problems. It's easier to show you than try to explain it. Go to http://www.badcustomerbureau.com/ and click on any of the Share links at the top of any post. Instead of sharing the post you clicked on, it tries to share a generic post with the same photo every time (photo of a dog). I used the code generator on the FB help site and it still has this issue. Please help!
I did receive one suggestion from a member of this site, but I am still seeing the same behavior.
I think its already working. I've tried it before in my own website http://socialviralworld.com/. You just have to login first and see the changes.
See image:

How can I keep a music player in the page footer that doesn't reload when I click a link to a subpage?

I have been trying to solve this problem for a while now and have looked on numerous forums to find a solution. Here is my setup. Any help would be greatly appreciated!
I currently have a index page that loads a JavaScript header and footer above and below my "content" section. I also have a list of navigation links inside of the header. My music player is located in the footer. It does not load automatically (for those that are bothered by that), and i don't want it to reload every time someone clicks on one of the navigation links on the side. I don't want to use frames for this; I have read that frames will allow me to only refresh the "content" section of my page, but that when indexing a site, most search engines will not work well with a site that has frames. I also do not want to use a pop-up for my music as most browsers and users have pop-ups blocked.
Basically i am looking for a code or something that will allow for a header and footer (doesn't have to be a JS header and footer) to not refresh when someone clicks on the navigation links located in my header. Thanks again to anyone that has a solution to this problem.
Do it like Facebook - use JavaScript to intercept link navigation, load the content using XMLHttpResponse, and then update the portions of the page that need to change.
This keeps the static integrity of the page for search engines, allows most of the site to still work just fine for users with scripting disabled, and avoids resetting the music for everyone else.
What Shog9 said, but also make sure to change location.hash whenever you change the content and make it so that visiting the website with that hash will redirect you to the correct page.
Here's another example of a band that uses the AJAX method to reload the page content, while keeping the player going...
http://jonandroy.ca/
The URL hashtag gets updates each time you click on something, and if you copy that URL, when you visit it, you'll see the homepage load for a split second, and then it loads the content of the page specified by the hashtag. Not perfect, but an overall good solution to this age-old problem.
You might want to look at how thesixtyone.com works. They have non-interrupted music by using AJAX to rebuild the page when a link is clicked rather than load a new one. This is achieved by having all links be anchors for the current page (i.e. all links are relative and start with a hash character).

Categories

Resources