How do I remove a facebook comment warning? - xfbml

my fb comments code is:
<fb:comments url="<?=$this_url?>" width="600" xid="<?=$this_unique_xid?>" notify="true" candelete="true" simple="1" numposts=1 url="http://www.veethi.com"></fb:comments>
Now if i want to remove the warning message:
Warning: this comments plugin is operating in compatibility mode, but
has no posts yet. Consider specifying an explicit ‘href’ as suggested
in the comments plugin documentation to take advantage of all plugin
features
I need to replace "url" to "href", but by doing this i lose my old comments,
Is anyone who facing the problem or solution pls, reply me.
I need one solution that remove the warning message and the same way i have all my old comments.
thankx in advance.

I wrote a complete tutorial with a small use of JS to solve this issue.
Visit the tutorial
What I did was:
Set off the parse for XFBML tags in the JS SDK
Adding a function-call to the JS SDK with a date parameter that you manually set it once with a date that posts published after that date will start using the 'href' version, and posts published until that date will use the migrated version.
Adding another attribute to the fb:comments tag which is 'data-date' and in it's value you place your post date (dynamic code).
Calculating the dates in a JS code, and base on the result it's removing the not wanted attributes, and finally then it's render the XFBML tags using FB.XFBML.parse

Instead of <fb:comments ..., I used <div class="fb-comments" ... and then everything worked correctly.

https://developers.facebook.com/docs/reference/plugins/comments/
Put your website URL, set the number of posts that you want to have in comments, get the code. First part put it in header, right after <body> and the <div> in single.php (single post template). Delete </div><?php comments_template(); ?></div> and add the one from facebook ;) Works perfect for me ;)

#gil-goldshlager, thanks for this workaround, I think a lot of developers are looking for this. I myself are struggling with this since a long time on one of my sites: sharemovi.es
I think most important thing you managed is to show old vs new comments side by side.
Unfortunately the yellow box still shows up in some instances, and some comments get lost consequently :
OK: post after 12.15.2011 without comments (http://sharemovi.es/theprestige)
OK: both post + comments after 12.15.2011 (http://sharemovi.es/biutiful)
OK: both post + comments before 12.15.2011 (http://sharemovi.es/thesocialnetwork, http://sharemovi.es/battlelosangeles and http://sharemovi.es/thequickandthedead) - really nice to see those comments back!
not OK: posts before 12.15.2011 without comments - 2 problems here:
a. yellow box with "Warning: this comments plugin is operating in compatibility mode, but has no posts yet. Consider specifying an explicit 'href' as suggested in the comments plugin documentation to take advantage of all plugin features."
b. the comments for those posts/pages that were made AFTER 12.15.2011 disappear (without comments: http://sharemovi.es/fromdusktilldawn, http://sharemovi.es/waiting, with comments - I checked moderation panel - http://sharemovi.es/ellesappelaitsarah and http://sharemovi.es/thegame )
All together, I get more comments now than before, so thanks again. However the yellow box is quite ugly, doesn't look professional. Very bad design decision from Facebook!
Hopefully you can look into this, I am happy to assist where possible.
Cheers
Bob

Related

How to get github edit history of issue and issue comments via api?

I only found api to get issue list, issue content, issue comments list and content, no issue content edit history, no issue comments edit history.
No, this cannot currently be done purely from the API.
However, if we reverse engineer the way GitHub loads past edits in the web interface, and do a bit of scraping, we can accomplish the same thing without the API. Unfortunately, this means that we don't have the reliability of an API - GitHub's web interface is liable to change at any time, breaking our code. But it's better than nothing!
So, first we need a log of all the edits for a comment. Let's do this with the comment https://github.com/seisvelas/crypsee/issues/1#issue-874033952 (from a test repo provided by the gentleman who set the bounty on this question). On order to get a log of this issue's comments, we will need to base64 encode the issue number with '05:' then the word 'Issue' at the beginning. Why '05:'? I have no idea. But it's always there and it won't work with out it. So we'll be base64 encoding the string "05:Issue874033952", which gives us MDU6SXNzdWU4NzQwMzM5NTI=
Great, now we insert MDU6SXNzdWU4NzQwMzM5NTI= into this URL scheme: https://github.com/_render_node/{BASE64 ENCODING HERE}/comments/comment_edit_history_log, resulting in a link to https://github.com/_render_node/MDU6SXNzdWU4NzQwMzM5NTI=/comments/comment_edit_history_log
Following that link, we see an edit history, but not the contents of the edits themselves:
However, this gives us the information we need! If we look at the HTML, we see that all edits prior to the current edit are defined as buttons with a link to that edit:
<button
type="button"
class="btn-link dropdown-item p-2"
role="menuitem"
data-edit-history-url="/user_content_edits/MDE1OlVzZXJDb250ZW50RWRpdElzc3VlRWRpdDo1MzIxODcxNzE="
>
The URL pointed to by the data-edit-history-url is the same URL loaded via the browser's networking tab when clicking to view a past edit in the web interface!
Unfortunately, if you attempt to view that page on it's own, you get a 404. It is intended to be viewed only from the web interface. But that's no problem, just go to the web interface, view one of the edits, and copy the headers it sends along. In my case I'm using Chromium, so I just find the request to the edit in my networking tab, right click and hit 'copy as Fetch request (nodejs)' and viola, with those headers I'm good to go!
For example, for the comment we've been using this whole time, I make that request and get back a bunch of HTML. The content of the original edit is near the end:
<ins><p class="rich-diff-level-zero">before edit</p></ins>
There it is! I could write a script to automate this, but then I'd be doing everything for you :3 Suffice it to say that with a day's work of cleverly organized scraping, this is roughly what you must to in order to view these revisions. If someone does make such a tool, the OSINT community will surely be immensely grateful!
To see the features of github api, it is better to read the following link
The best source to get the answer:
https://docs.github.com/en/rest/reference/issues
Check the issues you mentioned, ie issue comments, edit history issue, etc. in the link above
As far as I saw it is possible to receive issue comments but I did not see a section for edit history issue
I also suggest you see the following links for the edit history issue:
https://github.com/isaacs/github/issues/954

How to real-time update comments using Parse?

I'm posting/saving comments using Parse but it doesn't really update what user's currently looking at.
For example, on Instagram while reading a picture's comments, if any new comment's posted by someone, you see it right away. How does that work?
Not possible.
You'd have to use something like PubNub which is another service for your app besides Parse.
Found a clear and detailed answer here -
http://www.quora.com/Is-it-possible-to-use-Parse-com-for-realtime-chat-like-Socket-io

Is it possible to define the issue number in GitHub?

I would like to move from Redmine to GitHub by importing my repositories and issues.
In my commits I referenced issues by using issues numbers like #343.
Since issues number are cross project inside Redmine, I would like to change issue id in GitHub to match the same as in Redmine.
Is it possible?
Not easily. You create an issue by POSTing to /repos/:owner/:repo/issues. You can set title, body, assignee, milestone, and labels - that's it.
You might want to instead append the Redmine issue number to the GitHub title, like:
Button doesn't click [Redmine #1234]
You could also link to the old issue in the body of the issue.
See the create an issue API documentation for more details.
If that's not good enough, you should know that issue#s are auto-incrementing, so you could keep the number by POSTing them in the correct order, and POSTing and DELETEing throwaway issues for gaps in the sequence.

Multiple comment plugin loading on Blogger

on my blog I’m using from a long time the IntenseDebate pluging as commenting system in place of the default one.
I would replace it with Google+ comment system but I don’t want to lose all comments already left by the users via IntenseDebate, so I would figure out if there’s any way to load on the old posts the IntenseDebate pluging in place of the default Google+.
As possible solution, I’m thinking something like a tag in the html post code that (if defined) load the IntenseDebate pluging.
What do you think?
its not posible to migrate IntenseDebate comment on google plus. Their is one solution that you can use multiple comment system in your blogger blog. just few month ago i had written trick for the same. I hope that this will be useful to you.
http://www.tipsviablogging.com/multiple-comment-system-blogspot/

How to batch rename Tumblr tags?

I have tagged over 700 blog posts with tags containing hyphens, and these tags suddenly stopped working in 2011, because Tumblr decided (without any notice) to forbid hyphens in tags (I guess hyphens are blocked now, because spaces in tags (which are allowed) get changed to hyphens.). Unfortunately, Tumblr is not willing to globally rename all tags containg hyphens (although these tags are of no use anymore → 404).
Now I want to rename my tags myself.
I tried to do it with the "Mass Post Editor" (tumblr.com/mega-editor), but it's not possible to select posts by tag. I'd have to manually select post after post and look if a certain tag was used, and if so, delete it and add a new one instead. This would be a huge job (700 tagged posts, but more than 1000 in total).
So I thought that the Tumblr API might help me. I'm no programmer, but I'd be willing to dig into it, if I could get some help here as a starting point.
I think I need the following process:
select all posts that are tagged with x (= a tag containing hyphens)
tag all these posts with y (= a tag without hyphens)
delete the tag x on all these posts
I'd start this process for every affected tag manually.
I see that the method (or whatever you call it) /post knows the request parameter tag:
Limits the response to posts with the specified tag
(I guess I can only hope that this works for tags containing hyphens, too.)
After that I'd need a way to add and remove tags from that result set. /post/edit doesn't say anything about tags. Did I miss something? Isn't it possible to add/remove tags with the API?
Have you an idea how I could "easily" rename my tags?
Is it possible with the API? Could you give me a starting point, tip etc. how I could manage to do it?
I don't know if this might be helpful, but I noticed that the search function is still able to find posts "tagged" with tags that contain hyphens.
Example: let's say I have the tag foo-bar. It is linked with /tagged/foo-bar (→ 404). I can find the posts with /search/foo-bar (but this is of course not ideal because it might also find posts that contain (in the body text) words similar/equal to the tag name).
I tried to encode the hyphen (/tagged/foo%2Dbar), but no luck.
just for the record, because this is a popular google search: i've done it! you can use it at http://dev.goose.im/tags/.
i used a combo of PHP and jquery, basing my jquery off of a previous tumblr api script i wrote a year or two ago, and used this tumblr php oauth script for the authentication. if anyone wants me to put up the source code, i'd be happy to.
If you aren't a programmer, how much is your time is worth to you? As they say, time is money. Not only do you have to figure out how to use the API, but choose a language and learn to write in it. That's no small task. You could higher a freelancer for $50 for an hour worth of work.
To answer your question, yes it is possible to do this with the API. It mentions "These parameters are used for /post, /post/edit and /post/reblog methods." and tags is mentioned as a string of comma separated words.
What you want to do is get a listing of every single blog post using the /posts method. You'll want to look at the "Request" section to figure out the criteria to pass to this URL. You want it to be as general as possible to get a complete listing of all your posts.
After you get a listing of posts you'll want to iterate over it and modify the tags parameter provided in the response for each post. You'll want to use the id paramater along with /post/edit, which again takes tags as a string.
The simplest language you can use for this task is PHP. You'll want to look at the curl extension to make your requests. You'll want to read up on arrays as you'll be using them a lot. You'll also need to look at explode, implode, str_replace (for the dashes), and foreach for iterating over the result.
When you do this I would highly recommend you use break at the end of your foreach loop so it only affects one post at first. Testing it first will be important, as you don't want to accidentally erase your tags/posts. print and var_dump are good ways to help you debug the code. xdebug is a nice extension that allows you to step through the code line by line as it runs. Netbeans is an IDE that has good xdebug support.
There's also a nice page here to get you started with PHP. You'll need to install PHP on your machine. You don't need to install a web server - for this PHP-CLI (command line) sapi is good enough.