Link comment box to facebook page? - php

I got a really stupid question. But I'm in the startup-fase of integrating a webpage with Facebook.
My question is if a Facebook page has a App-id? If that's the case, how can I find it?
What I'm trying to do is add multiple comment-plugins and would like them to be linked to my page. Perhaps even so that the comments appears on the pages wall.
Thanks in advance!

If you are the admin of the page you can get the page ID.
Go to your page, click Edit Page then Update info (not sure if these are the terms cause I use FB in portuguese language).
The URL in the adress bar tells you the ID. Its the number between 'id=' and the '&' symbol. Lets say it's 1234567890. Copy it.
Now, in a comment just write #[1234567890:Name of the Page]. Submit your comment and see what happens.
Hope that helps.

A facebook page doesnt have an ID, you need to register a new app for your page.
You can create an app here

Related

How do I find out that a link was seen

I'm trying to make a page with some links and when somebody clicks on a link, the score count will go up.
How can I find out the visitor who has really seen the page related to link? But not just click the link and close the page for score...
really seen means: page loads completed.
and my links opens in new window.
any solution?
You cant really see pages that aren't in the same domain. Chrome even puts them in a separate thread.
Back in the day you could have used a CSS exploit talked about here: https://developer.mozilla.org/en-US/docs/Web/CSS/Privacy_and_the_:visited_selector
If you really want to make a page with this kind of functionality you will have to make a browser plugin/extension.
You can include a nonce token in the link, and post that token to the server, render the page embedding that same token in some javascript and have the javascript post back the token when the page is done rendering. Seems kinda overkill though.
The only thing I could thing of is maybe make the link to like a redirect page on your site and then you could control to see if the page was loaded and then like after the page was loaded redirect to the actual webpage to link is intended. This way you know for sure that the user waited to view the webpage.
Other than that I don't think there is any other way for you to go about this.

when doing a 'like' on one of our page, the 'like' is posted twice

We just implemented a Facebook like button everywhere on our site. However, it works a little bit weird on one of the pages.
If you click on the like button anywhere and then write a comment, it only posts once on Facebook. This is the correct behavior.
Unfortunately, on the another page it creates two items on your Facebook wall.
Has anybody previously seen the same problem on any site?
I use an iframe, and the link is what I call there:
www.facebook.com/plugins/like.php?href=%s;send=false&layout=standard&show_faces=false&;action=like&colorscheme=light&font=arial&height=35&appId=%s
The first %s is the current URL, the second %s is an appid.
Its a common bug, ive got a facebook like box too. And when i like my own page it will be liked twice. You cant do anything about it. Other visitors who like your page will only show up once.

Internal page - don't want it crawled

Please indulge my simplistic example:
Let's say I have 1 million pages on my site. Each page has an ID number (i.e. www.mysite.com/product.php?id=1 .... upto id=1,000,000
I want to make a page that allows users to email themselves the link to the page (or email a friend). This page is also dynamic and comes from the product.php, so like this:
www.mysite.com/email_a_friend.php?id=1 .... upto id=1,000,000
Imagine I do this and now google wants to crawl 2 million pages instead of 1 million. This seems pointless since the page doesn't have anything of any value on the email page. Also, consider that the email page would actually be a pop-up window on the product.php page.
What is the best way to handle this?
Should I block it (email_a_friend.php) through a robots.txt file?
Or should I perhaps used java or something else for the link that google would ignore anyway?
Thanks!!
If I'm understanding your question correctly, you have an e-commerce site and want to implement a share button for a particular product. What you don't want to happen is have google index the page that the share button goes to.
If that's the case, just add a rel="nofollow" to the link in your php that generates the link and you should have no problem.
Here is a google help article that explains how google does not follow links with the nofollow attribute: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=96569

Facebook App: User should first click like button to use the app

I have seen this in many apps where user is first asked to click like button and then redirected to the main app. How can I achieve this?
I am using php.
Adding a like button on top of the app pages doesn't attracts much likes.
Any help is appreciated!
-Sandy
There are so many solution already for this. Basically you just need a javascript script to hide the main page , and a php script to show the page so that until the user cliks like, then you show it.
A simple searching gave alot of code.
check this ones on stack, or this one and also, this one
Basically, you have to use jquery to hide the page
hope this helps!

Integrate facebook Like button for a specific element of my website

I have a website where i implement a wall of messages, the idea is to add to each of this wall messages a like button, where clicking on it would immediately post on the user's facebook profile page that he likes THAT SPECIFIC COMMENT.
Is this possible? I just enter this new world of facebook php developers, and as far as I have read here it always talks about adding a Like button for a specific URL. I would like to make the like button apply for the specific post within the messages wall.
I am clueless as where to start, if by the way any one could recommend a detailed tutorial on how to integrate a website to facebook in its different ways, i would really appreciate it.
EDIT:
Looking into #Kaan Soral suggestion of using open graph, I think it is important to add that I dont want each wall post that the user likes to appear in the "Likes and Interests" section of his profile... This wouldn't make sense because he would rapidly have loads of likes of separate wall posts.
Its possible, read this: http://developers.facebook.com/docs/opengraph/
You have to create a URL for every item that will be liked and on that URL there should be META tags for descriptions, image etc

Categories