I have a question about FB group search through URL. I want to search a FB group contents by sending a query parameter like this https://www.facebook.com/groups/905344972984695/search/?q=tasty%20foods
But when I open this in new window, it opens the main group or if I am not logged in then it shows an error without any details.
So how can I achieve this search without using FB graph or authentication?
Related
I am using facebook graph api with this edge
me/conversations?fields=participants
Graph API Explorer
this get list of conversation for my page using page access token. Now i need to search in this list by user name
Any suggestion to do that directly with API or any workaround ?
As a workaround you can call with the limit parameter set:
me/conversations?fields=participants&limit=500
It will show you 500 latest threads. Then cmd+f (ctrl+f) and type the name you are looking for.
Goal
My goal is for a user to share something he created on my site to Facebook, and for me to display all comments on my own page using the Facebook comments plugin.
So my ideal flow would be:
User creates content with example id vjrjf834fdkfj, and shares using public URL http://example.com/vjrjf834fdkfj/.
User shares this URL on Facebook via my Facebook app ID. The post ID is 1234567.
I get this post ID. (This is what I need help with)
I store this in my database.
Whenever a visitor visit the page http://example.com/vjrjf834fdkfj/ I look up in the database what the post ID is (1234567 in this example), and call the Facebook comments plugin using this post ID.
What I tried
Attempt #1
First failed attempt: read the post_id field of the FB.ui callback but this response is typically empty because Facebook says that:
Only available if the user is logged into your app using Facebook and
has granted publish_actions. If present, this is the ID of the
published Open Graph story.
My user is not always logged into my app via Facebook, because he can also create a normal account.
Attempt #2
So my next attempt was to get a list of all posts of this app by calling the Graph API. I have a "basic" app with the "Website" platform set to my website URL (www.example.com). Given this list I might filter this on the relevant URL and voila, get the post ID for the right URL.
I can create an access token and call https://graph.facebook.com/v2.8/{app-id}/objects?access_token={token}, but this gives an error The parameter type is required. And when I try to get a list of object types by calling the /object_types endpoint, I get an empty list.
Attempt #3
I also played a bit with creating a Page Tab but the documentation makes no sense to me as to how that would apply to my case. I ended up with two extra pages, all empty, and not what I want. However, I could live with an extra page on my Facebook page showing a list of all posts that have been shared (so these posts would appear here and on my user's timeline).
Questions
So:
Why is this object_types list empty? I expect that something like "post" would show up here, allowing me to get a list of all posts associated with this app ID.
If this is not possible, how can I still achieve my end goal?
Thanks.
I want to create an entrance app for some events at a congress.
Only users which liked our company-facebook page before should be allowed to enter.
I was reading around the last days, that it is not possible (only if the user logged in with facebook connect on our site) to see via the Graph API, which users liked our page? We would have the email adress (over an external registration form), but not the FacebookID.
I'm wondering if there are solutions outside, which i didn't found...
It's not possible to get the list of users who have liked your page.
But since you are having the email_ids of the users who have liked the page, you were left with one thing - searching users with email_id BUT unfortunately this has been disallowed by facebook. See here. It says-
The ability to pass in an e-mail address into the "user" search type was removed on July 10, 2013. This search type only returns results that match a user's name (including alternate name).
For future ref, if you have some application, you can query for /me and save their facebook ids.
using facebooks api... how do you post to a page a user likes on that users behalf... for example I have a user that likes a certain page. They can log into my app and make a post on that pages wall via my app instead of logging into facebook to do it.
If the user grants your app the publish_stream permission then you can post on his behalf on pages he likes (or pages that don't require to like in order to post).
You can try it yourself with the Graph API Explorer, just go there and click the Get Access Token button, then go to Extended Permissions tab, select "publish_stream" and confirm.
Then in the address field put a page you like, let's say southpark/feed and submit, you should see the feed of that page. Now, change the method to the left of the address field to POST and click the Add Field link and write in the name "message", enter a value and submit, you should get an id of the post as a result.
I need to do something similar to the Facepile social plugin for a site I'm working on. The problem is the client does not have have a Facebook page, but instead has a Facebook Group (with some 4000+ members).
I guess I could urge the client to move their group members to a page, and I might do that in the future. But before I do I want to research how we're going to do Facebook-integration more thoroughly. For now I just need a quick fix.
While it's possible to list group members (with a 500 limit), your main issue is going to be the identification of your visitor.
The facepile plugin, like the other official plugins, is automatically connected if the current user has an active facebook session (because it's running on the facebook.com domain)
That allows it to display things like "xxx of your friends are already fan", even if the user is not logged to your site.
But if you program your own, you won't be able to access the current facebook session, you'll need to create your own session, which means you'll have to create a facebook application and have the user login to it before you can know how many of his friends are members of the group.
Also, there is no way to use the API to make a user join a group. This action has to be taken manually by the user.
Without an active user session, at best, you could list a random number of group members (using your own session key with the offline_access perm) and a link to the group.
If you want to list members of a group, here is the FQL query:
select name from user where uid in (select uid from group_member where gid = 146797922030397 limit 50)