facebook comments, what happens when domainname change? - facebook

I am currently developing a new blog platform with some new features. For the commenting on blog posts i'll use facebook comment. (each user has to create their own account for comments on facebook).
But i have one problem.
Each user can, whenever they want change their account name (subdomain name), and also the domain they use. ( i have several domains available).
But when facebook comments use the href of each page to sort the comments i am afraid there will be a lot of lost comments for my users. when they change account name..
What happens with the comments when I change the domain / subdomain but keep the folder structure & filename as before? is there a way to convert the old "href" values to the new with the new domain name?
How to solve this? any ideas?
As i understand, the XID value is the old way of sorting comments, and you should use href?
Thanks!

Is this a custom Facebook app or are you using their default commenting system? If you created a custom app, the comments may be associated with your XID.
However, if you are using the default commenting you might have problems. Facebook comments rely completely on the URL that they are associated with. So, you will lose comments when moving to a new domain.
With that said, you might be able to reference the old URL from your new domain name and pull the old comments.

Related

Getting facebook page with app_scoped_user_id is not possible anymore?

Below url gaves the user's facebook page till yesterday. But it's not working anymore.
https://www.facebook.com/app_scoped_user_id/xxxxxxxxxxxxx/
Is there any way to get user's facebook page or it's disabled for a security reason?
Unfortunately, Facebook have chosen to disable the ability to resolve app scoped user IDs, so this feature is now gone. Seems they havent yet responded to people registrered to the bug to let them know.
https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/
There's a new permission in Graph API 3.0 that provides a URL link for a facebook profile:
user_link
In order to use that, you have to submit your facebook app for review (and likely have a legitimate reason you need this information.
Update: I went through this process, our app got approved for user_link permission, and it works as advertised.
The user_link variable is an app scoped link that will work as long as the app remains approved, and will stop working if the app should get removed or they revoke the approval. So it's a special URL that really only works as long as the FB app is around.
https://developers.facebook.com/bugs/2054375031451090/
Subscribe to that bug to get updated on the status.
There is also a blog entry about this: https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/ - so this is actually not even a bug.
This is no longer possible and will not be, according to https://developers.facebook.com/blog/post/2018/05/01/facebook-login-updates-further-protect-privacy/
Your best bet going forward is to open the Facebook site and search for the user name like so:
JavaScript:
Assume user is an object with a property called name that contains the user's name.
window.open("https://www.facebook.com/search/str/".concat(encodeURIComponent(user.name)).concat("/keywords_users"));
In most cases this will allow you to quickly find the person in question, given that you can still display their profile picture using the app-scoped ID on whichever site lists users. It's not great, but it may be of help to someone. We've resorted to this solution in our CRM.

Create a bot for a closed facebook group

What I'm trying to do is basically described in this particular
doc page from FB itself: click (post, comment content and listen for new content), but for a "normal" closed group instead of a group in a workplace.
According to the document, this would only be possible by storing the user access token of the group admin and use various graph API endpoints, but this does not seem like a good solution to me.
Is there any other known way (something like creating a Facebook app which will create posts, comment/like stuff and listens to new posts made in the group (similar to the group bots in workplaces))?
Thank you in advance!
Luca
Is there any other known way (something like creating a Facebook app wich will create posts, comment/like stuff and listens to new posts made in the group (similar to the group bots in workplaces)) ?
No, there is not.
Reading posts and creating them using the group admin's token would be possible, but that's about it.
Liking posts in the name of users has generally been removed (not just for group posts),
commenting will likely not be possible either for any non-admin in a closed group, and
Webhooks do not cover non-workplace group feeds as of now either, so you'd have to do constant pulling to get new posts.
And yet, the Facebook API clearly states:
In groups, bots can do many of the things that people can do. This means you can build bots that post new content, comment on content with new information and like posts to indicate acknowledgment or approval.
https://developers.facebook.com/docs/workplace/integrations/custom-integrations/bots#botsingroups

Google Analytics & Facebook Connect referral

I'm currently working for a company which uses a lot of Facebook Connect. On their website, that's their main Call to Action.
I can see plenty of visitors coming from Facebook as a referrer and it looks like these people are actually only connecting to the Facebook connect.
I decided to add the domain "s-static.ak.facebook.com" (the one giving all those referrals) to the Referral Exclusion List. However, I'm still getting as much referrals as before.
Do you have any idea what I could do?
Note: I don't want to exclude that traffic, I just want GA to avoid counting this domain as a referral. It's like 40% of the traffic, so it's clearly weird.
Adding Facebook (s-static.ak.facebook.com) to the referral exclusion list actually worked. I was still seing plenty of users coming from this source because old users where still attributed to this "old" source.
If I segment users by New vs Returning, I can now see that users are coming from various sources and not only from Facebook.
Here is what I'd recommend:
Add Facebook to the referral exclusion list (s-static.ak.facebook.com)
Create a new profile to avoid getting old data

Facebook comments / permanent link

I had setup my website to use Facebook comments (using https://developers.facebook.com/docs/plugins/comments/) and was all working fine.
Unfortunately, my domain name expired and was snapped up by a domain parking company before I renewed it. I purchased a new domain name (the same, but .net instead of .com) and setup the website.
I have put in the same code as the previous site, and the comments do appear (because the old url is in the code), but on facebook profiles, the links are broken because they point to the old site (.com).
I can swap every .com for .net in the facebook code to get the links in Facebook working again, but this will mean I loose all my comments.
I would like to know if there is anyway of asking Facebook to move the comments associated with the old URLs to the new URLs, because I guess this is the only way of keeping my comments and making the links in facebook.com work (linking back to my new site).
Any info appreciated, I know this may not be a coding issue but it seems to be the best place to ask. I have seen similar posts, but they still have access to their old pages.
Many thanks!
As far as I know; You can retrieve the comments made on your old domain, but you will not be able to import them as regular facebook comments.
Instead, you can use a tool like disqus, to export the comments you retrieve from facebook.
To retrieve the comments, use one of the following methods:
1- Using facebook graph API
https://graph.facebook.com/comments/?ids={YOUR_OLD_DOMAIN_URL}
2- Using facebook FQL
Then, use this post to help you exporting the comments to disqus.
Hope this helps.

Use Facebook Graph API to Remove Friend Connections

I have a question about weather something is or is not possible with Facebook's API.
Can a server side script have access to a users account and remove a tag associated with another person? Or remove photos that has a particular friend in it (obviously only if the person has been tagged)?
For instance maybe I want to remove all connections I have with another person, can the Facebook API graph allow me to do so if I specify the individual?
I am not looking for how to do so, I am first trying to find out if this is even possible. I have been pouring over documentation but it is something that I do not completely understand and I will not be the one writing code.
Any help or direction will be great, thanks!
No you can't unfriend a person through the API. Even deleting photos is impossible, unless the app created the photos in the first place. There are numerous other threads on SO about this, as well as forums posts about people that have struggled with problems in the recent past. You can't even delete a tag of a photo through the API even though DELETE methods exist in the documentation and indicate that it should work. When making the calls people receive oauth error results, and there is probably still a pending bug report about this behavior, but no expectation that FB plans to fix it anytime soon.
In general they are happy to let you add a lot of content, but they don't want to let you remove it -- and that goes double for the API.