I am using Disqus Comments with JavaScript Embed Code and PHP Single Sign-On on a webpage of mine. I want to make it so that users who are not logged in can only view comments, but not actually comment. So how can I embed view-only disqus comments? Thanks!
I really need to do this in a programmatic way, via PHP if possible. So if $readonly is true, the comments need to be view only. If it is false, the comment box needs to be enabled. Unfortunately there really isn't anything else I can do. Bounty Started.
When I refer to logging in, I am implying logging in on my own website, not on Disqus.
You can disable guest commenting in the Disqus Admin -> Settings page
When its turned on, comments can be read but a login via Disqus, Google, Facebook or Twitter is required to leave a comment.
Let me know if this is what you wanted.
I originally put this forward as a comment, but I think it's as close to an answer as you might get.
Turn on pre-moderation (Disqus admin > Settings > General page)
Then use Disqus whitelisting to automatically approve all of your own website users.
Use the Disqus API (e.g. via PHP) to automatically post your site users to the Disqus whitelist. See Disqus whitelist API add.
Users could still log in via Disqus to try to comment, but those comments won't appear on your site - they'll go into the moderation queue where you can ignore/delete them without them becoming public.
You could also add a message above the Disqus comment area telling people the rules of your site so they don't make the mistake of using the Disqus sign in option.
The problem is. Every DOM-manipulation (e.g. triggered by an php script) is outwitable through modern browser's web page inspectors.
That's why I think, you have to implement your own comment system or have a look at the given API features of disqus.
Related
I want to embed a whole list of comments from a Facebook post into web page. I googled around but found that Facebook only supports embedding "single" comment.
For example, I create a post in my Facebook post and my friends comment on the posts. Now I want to embed all my friends' comments into my blog, without the post content.
Is this currently officially supported by Facebook? Or is there any 3rd party library can help to render the comments following Facebook UI style?
Thanks in advance.
Take a look at "Comment Mirroring" with the Comments Plugin in the docs: https://developers.facebook.com/docs/plugins/comments
It may be what you need, but afaik it only works with Pages.
You could also use the graph api to read the comments, but that would only work one way (from the page to your website). Check out the API reference for more information about that: https://developers.facebook.com/docs/graph-api/reference/v2.7/comment/
Edit: Comment Mirroring is deprecated now: https://developers.facebook.com/blog/post/2017/11/07/changes-developer-offerings/
I am looking for a way to show Facebook engagement on from our website on our Facebook page. IE, when someone likes/shares etc. a page on the website, that that activity be reflected by our Facebook page in some way.
I was planning on using the graph API calls to do page updates, but the permissions are granted to users, not to the app itself, meaning this would only be possible for existing administrators, defeating the whole purpose (Perhaps a bit obvious in hindsight).
Is there a good, clean way of posting page likes/shares of our web pages to our Facebook page feed?
Notes:
I'm working in PHP and/or client side JS
A high volume of posts drowning our regular content is not likely at the moment, however, advice about how to manage such a beast in the long run might be helpful
If I understood correctly and want to share content from Facebook into your Website, the behavior you mention used to exist via the Activity Feed or Recommendations Feed. However, it has been deprecated since Graph API version 2.3.
If what you want is to update comments from people in your Website to your FB Page, you could implement something in your backend which listens to content uploaded and uses your Page Access Token to create custom stories using your user's data. As you mention, it won't happen in the name of people, but you could be creative and make the text narrate what people did on your website. Maybe even use OpenGraph for this.
Does anyone know if Facebook frowns upon content only they can access, meaning not publicly reachable? I have a test server http://test.somesite.com with some custom JS which we implemented Facebook like buttons with. This is where we test the development code prior to deployment to the live server at http://www.somesite.com so we want to have solid test coverage including these like buttons.
The server http://test.somesite.com is only accessible to our office and a few places outside if we open our firewall. To get the like functionality tested, we can punch a hole in the firewall for Facebook to hit.
The problem I'm concerned with is if Facebook detects the limited content accessibility. I'm sure they don't want to post tons of links to pages that their users will get a 'Forbidden', other error, or timeout if they click on it. I know Google would have a fit if they detected you doing something like this and it affected their search results... Also, there's the concern for Duplicate content being on both http://test.somesite.com and http://www.somesite.com.
Does creating a test links like this hurt our main server or domain in Facebook searches? I'm unfamiliar with SEO guidelines for Facebook (or if there are any yet).
Facebook needs to access the og tags on the page in order for the like button to work, so if you want to test it, your site needs to be accessible. What I'd be more cautious about is repeatedly posting then deleting stories from your site in the testing. I think Facebook would take that as a signal to rank down your content.
Facebook doesn't have any SEO guidelines. You can test as much as you need.
I have built a simple webpage in PHP. I want to tell if users like my page (I placed a like button on it). It is not a Facebook app. I have seen this, but don't know how to use it with PHP. I don't know JavaScript at all. I tried pasting the code listed at the link into my page, but it didn't do anything useful.
A PHP solution would be preferable. I don't want to build a Facebook app, I just want to know if the Like button has been pressed.
Any help would be appreciated. Thanks!
Edit: Here's the link to my website, per answerer request: testingground.comyr.com
Those Edge events are only usable to detect if the user clicked the Like Button right now, but you cannot check if he already liked your page. That is only possible with an App, and user authorization with the "user_likes" permission.
More information:
Check if logged in user has liked my Facebook Page
Check if user liked page or not
Why don't you use the Facebook developer reference documentation?
Without an API Access, I think there is no possibility to do that.
How should you have access the private token what a random user liked?
I want to provide a simple piece of Javascript (or an iframe, I guess) that allows 3rd parties to embed functionality from my site in theirs. The user of said widget will be authenticated on our site already - so basically the Facebook Like button, or Facebook Connect, are the closest examples I could find.
Since Facebook has a few different buttons I'm struggling to understand exactly what they're doing though. Is there a succinct (and technical - I'm a developer and want to build my own widget) explanation somewhere? I'm particularly focused on the security issues involved.
Here is a brief explanation of the facebook 'like' button and here is a tutorial on how to build a web widget. Finally here is a discussion on the security of web widgets.
I believe the Like button is using cookies to obtain your FB user information, that with additional attributes are then sent to a service endpoint.
As for security measures, an obvious would be to allow requests only from websites with given access keys.