w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Is there a way to fetch all posts in a user's facebook wall through graph api?
You can instead use FQL instead of Graph API for your case. You can query the stream table to retrieve the status created between certain dates. For example to retrieve status updates between 21th June and 28th June you can create FQL like SELECT post_id,message,actor_id, attachment, description FROM stream WHERE created_time > 1371790800 and created_time < 1372442741 and source_id = me() and actor_id = me()

Categories : Facebook

Retrieve posts and comments from Facebook wall with Open Graph/FQL
Here are the two queries. You need to include type = 'newsfeed' then that would bring up posts made by your friends,just like your news feed on facebook.com getpost: ("SELECT actor_id, created_time, likes, post_id, message FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed') AND is_hidden = 0"), users: ("SELECT id, name, url, pic FROM profile WHERE id IN (SELECT actor_id FROM #getpost)") http://fbdevwiki.com/wiki/FQL:stream

Categories : Facebook

Getting 'pic-square' from user posts on the news feed using Facebook Graph API
Well after a lot of research and trial and error with FQL I figured it out. It's a series of nested queries and it returns an array with the urls of the pic-square images of the users whose posts appear in your news feed. The FQL query looks like this: SELECT pic_square FROM user WHERE uid IN (SELECT actor_id FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid=me())) I was not able to differentiate between user and page profile pics.

Categories : Facebook

Facebook API get public profile wall posts
For the feed of a Facebook Page, you only need an App Access Token, which is easy to get: APP-ID|APP-SECRET For example: string urlGetFeed = "https://graph.facebook.com/thepagename/feed?access_token=" + [app-id] + "|" + [app-secret]; Also, the Access Token is not a value of "fields", it´s a separate parameter.

Categories : C#

How to get the friends' posts on a facebook user's wall
I've been testing what you said and it is correct. It is returning an empty array. There is a small detail that we are missing and that is the LIMIT. By default the limit of the posts that it will be returned is a small one and there is a big possibility that the required post is not found in that limit. The solution is the following: SELECT post_id FROM stream WHERE actor_id=actorID and source_id = me() limit 100 If you still get an empty array try increasing the limit. This worked fine with me though.

Categories : PHP

Facebook PHP API post to wall falls under "Recent Posts by Others"
Just posting the answer as answer. When posting as a page, you need to get manage_pages permission, then get the desired page's access_token via /me/accounts API call and use that token to make the /{page_id}/feed POST call. Flames, the original poster, managed to do this and posted his solution edited in the question itself. I just pasting it here and making it Community Wiki $appId = 'YOUR APP ID'; $secret = 'YOUR SECRET'; $returnurl = 'http://www.yoursite.com'; $permissions = 'manage_pages, publish_stream, offline_access'; $fb = new Facebook(array('appId'=>$appId, 'secret'=>$secret)); $fbuser = $fb->getUser(); if($fbuser){ $page_id = "YOUR PAGE ID"; $page_access_token = ""; $result = $fb->api("/me/accounts"); // loop trough all your pa

Categories : PHP

Facebook on Android: What kind of intent is used by links clicked from wall posts?
I believe you are probably looking to do something similar to this tutorial http://blog.vogella.com/2011/02/21/android-intents/ Although I can't be certain of what Facebook is calling, I know that all of my current browsers on my Tablet have the option of being used. I would assume they are using new Intent(Intent.ACTION_VIEW) Keep in mind that if you register your app in this way you will look like a browser to all apps, not just the Facebook app as you suggested.

Categories : Android

How to filter user's news feed to posts/actions from a specific app in Graph API
With all FQL queries, your WHERE clause must include at least one indexable field (those are marked with a star next to the field name in the docs) – for performance reasons. So for the stream table you have a choice between source_id (id of the user whose wall the post is on) or filter_key. You can read the valid filter keys from the stream_filter table – but every user has the filter key nf for what shows up in their news feed. (post_id is also indexable, but of no use for us here.) So you could try filtering with WHERE filter_key = 'nf' AND app_id = 'YOUR_APP_ID' – that should give you the posts that your active user is able to see in their feed that where made via your app. You could also try with source_id, filtering that to either being equal to me() (your current user in FQ

Categories : Facebook

PHP system posts, receive all of my friends posts on the page, like on facebook and twitter
For Facebook you can use the FQL method https://developers.facebook.com/docs/reference/fql/ Check them and see what suits you. For example for artist information you do something like this: $fql = 'SELECT name,fan_count,page_id,hometown,record_label,pic_cover,pic_large,website from page WHERE type="musician/band" AND name="Rihanna"'; $ret_obj = $facebook->api(array('method' => 'fql.query','query' => $fql)); foreach ($ret_obj as $var) { //Get the information you need. } You can not use SELECT * in FB to get everything you need. You have to specify all that you need. Similarly for twitter, check https://dev.twitter.com/docs/api/1.1 . For example this gives the last 100 tweets of a person with that particular ID. $info=$twitter->request('https://api.twitter.com/1.1/stat

Categories : PHP

Facebook Graph API - Searching in public posts
Use the '|' operator. In your note, 'q=A&q=B' you are reassigning the value of 'q'. The API parses the string set as the value for 'q' and uses the '|' operator to parse between. Either way you will have a tough time finding a lot of results because the 'search/post' API is now deprecated.

Categories : Facebook

Facebook Graph API search posts with picture
I also faced the same problem, it is because a post with an attached picture is no longer considered as post but as a photo contained in the timeline pictures album which one is not searchable through the search api. Can't wait for real hashtag search reachable through the api.

Categories : Facebook

Reading Facebook's Public Posts and User Profiles using Graph API in RestFB ?
Try read the documentation about tokens, you have four types of tokens. See what suits best for you. User Access Token – The user token is the most commonly used type of token. This kind of access token is needed any time the app calls an API to read, modify or write a specific person's Facebook data on their behalf. User access tokens are generally obtained via a login dialog and require a person to permit your app to obtain one. App Access Token – This kind of access token is needed to modify and read the app settings. It can also be used to publish Open Graph actions. It is generated using a pre-agreed secret between the app and Facebook and is then used during calls that change app-wide settings. You obtain an app access token via a server-to-server call.

Categories : Facebook

Getting number of wall posts on an event page
Get all the posts by var client= new facebookclient("accessToken"); JsonObject allData = (JsonObject)client.Get("me/feed"); here allData variable will contain all the post of your wall. now you can use it foreach loop to compare with your specific url feed and use it which you need from it.

Categories : Facebook

PHP-API, post to wall posts as user and not as site when link is added
If you are posting on a facebook page, use the page access token instead of the user's access token to post on behalf of the page; instead of user. Read more about Page Access Token here.

Categories : PHP

MySQL: Feed posts are displaying too many times
I think there is some problem with your query . when i look at your database structure then i can see there is username column in post table . that username is for user who post the comment , right ? if is it so then you just have to check that that user is in your friend list or not . you can do something like SELECT * FROM POSTs WHERE USERNAME IN (SELECT FRIENDS FROM USER_FRIENDS WHERE USER = 'shawn31313' union all select 'shawn31313' ) More faster query will be : SELECT * FROM POSTs AS A INNER JOIN (SELECT FRIENDS FROM USER_FRIENDS WHERE USER = 'shawn31313' union all select 'shawn31313' ) AS B ON A.USERID = B.FRIENDS The logic is find all your friends and then find all the post of those .

Categories : Mysql

Atom Feed shows header but no posts
If you are trying to get the article content, use $item->get_content(); instead of $item->get_description(); The feed you listed also does not have any articles. If you paste it directly in your browser you will see the feed page with no content.

Categories : PHP

Using facebook graph api how to get news feed with large picture size if the feed type is photo?
I'm currently searching for the same thing. I know you can swap _s for _n at the end and get a larger size... but I haven't figured out how to have the api return the larger size on its own.

Categories : Facebook

Rails call comment box with jquery on single posts in a index page where all posts are listed
$(document).ready(function(){ $(".comments-show-button").click(function() { var $thisPost = $(this).closest('div.span6'); var $comments = $thisPost.find('div.comments'); $comments.show(500); $thisPost.find("#remove-button").show(500); $thisPost.find(".comments-show-button").hide(); }); $(".comments").mouseout(function(){ $("#comments-show-button").hide(); }); });

Categories : Javascript

FacebookClient.Get("/page_name/feed") always returns only 25 latest posts
if you try to add &limit=30 to the url you have (/{0}/feed) you should see 30 posts (I didn't test it today but it worked until a week ago...It should still work). So maybe you need to add a variable to build a different url. Let me know if it works.

Categories : Misc

Do I need to use OAuth to get a feed of latest posts from an FB group of which I am admin?
Yes you have to put access token to get feed but no need to worry this access token can't share your any details.it just a token to get feed. You can generate your access token no. here. https://developers.facebook.com/tools/explorer/?method=GET And you can get feed for your page with following url: https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN Thanks

Categories : Facebook

How to optimize this function for returning posts in a feed. Django
Your main concern is not something you need to worry about. Check the docs on When querysets are evaluated - you can define and add clauses to a queryset indefinitely and it won't actually be run against the database until you call something that actually requires hitting the database. What will require multiple queries is iterating through time until you hit a window that has posts. You'll have better performance if you check the latest created time in one call, use that to work out your window, then limit the posts based on that and then sort by number of votes. Something like: unorderedPosts = Post.objects.all() if request.user.is_authenticated(): preferences=request.user.categorypreference_set.filter(on=False) for preference in preferences: #filter by category preference

Categories : Python

news feed from facebook wall to a android app
Of course, you can. First of all, if you are new to facebook integration- read the basics of the android integration, login/authorization calling its APIs etc. (not complex at all). Facebook provides many APIs (for different functions) that uses the access token. Based on your requirement, you just need to use the API: /PAGE_ID/feed with the page access token to get the feeds of your page. The page access_token can be obtained with the API: me/accounts?fields=access_token,name (Demo) after the user authorization/login. You can test this API here: Graph API Explorer, using the default token already present there. Smarter way (Without using the facebook API) Since your requirement involves only back-end processes, you can use this method. First of all, get the Long-lived page a

Categories : Android

How can I have a dynamic image show when someone clicks the Facebook Like button and Posts to Facebook?
Change the meta tag on click: use this example and modify it to your needs. <!DOCTYPE html> <head> <meta charset="utf-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <title>Title Of Page</title> </head> <body> <input type="button" value="Click Me" onclick='$("title").html("Changed Dynamically");'/> </body> </html>

Categories : Facebook

Show sticky posts at the top, then display other posts
you can get it ny multiple loop as follows <?php $sticky = get_option( 'sticky_posts' ); $args_ordinary = array( 'post__not_in' => array(4269,$sticky), 'post_type' => 'whatson', 'exclude' => '4269', 'posts_per_page' => 3, 'order' => 'ASC', 'orderby' => 'date', 'post_status' =>array('future','published')); $args_sticky = array( 'posts_per_page' => -1, 'post__in' => $sticky, 'posts_per_page' => 2, 'post_type' => 'whatson' ); query_posts($args_sticky); if (have_posts()): ?> <?php while (have_posts()) : the_post(); ?> //sticky post <?php endwhile; ?> <?php endif; ?> // Now

Categories : Wordpress

Wordpress - Posts Page shows same 5 posts
You may try this (remove the offset) $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $recentPosts = new WP_Query( array( 'cat' => 3, 'posts_per_page' => 5, 'paged' => $paged) ); More on Codex.

Categories : PHP

bigger images in facebook posts when posting via facebook php sdk
bigger images in facebook posts when posting Use the Open Graph to create the custom stories.

Categories : PHP

Tagging/Mentioning Pages or Users in Posts via Graph Api
You can't tag people on a feed using the Graph API, you have to use Open Graph concepts- Mention Tagging/ Action Tagging (based on your requirement) There's a small workaround (not preferred), you can look if it fits your requirement. But if you want to post a photo, then you can tag the people using tag parameter. Good luck!

Categories : Facebook

Video share on facebook wall using Graph API
<meta property="og:video" content="http://staging.derbywire.com/video/player" /> <meta property="og:video:type" content="application/x-shockwave-flash" /> You have to give the URL of the actual SWF file that plays the video here – the address you have given (http://staging.derbywire.com/video/player) however delivers a full HTML document. Facebook is not so silly to just embed full HTML documents into their page. So change that property to the address of a stand-alone SWF file that will play the actual video.

Categories : Facebook

How do I get the posts of a closed Facebook group using Facebook PHP SDK?
You need to request the user_groups permission to access a closed group information. To read a Group, you need: any valid access_token if the group is public (i.e. the group's privacy setting is OPEN) user_groups permission for a user's non-public groups friends_groups permission for a user's friend's non-public groups Groups for Apps and Games require the use of an App access_token Source: https://developers.facebook.com/docs/reference/api/group/

Categories : PHP

trying to use use facebook-php-sdk library to retrive facebook posts
“What am I missing here?” Authenticating the user. You’re calling getUser(), but until you authenticate, Facebook doesn’t know which user to get details for. I’m also unsure why you’ve missed it, as it’s the example on the GitHub repo for the PHP SDK.

Categories : Facebook

Get posts from facebook user
There is a way through using FQL. It will return your a number of the most recent posts, I don't know if there is a way to get the posts between 2 specific dates. Try the limit one: $Posts = 'SELECT created_time,message,like_info,type,attachment,share_count from stream WHERE source_id=1234 AND actor_id=1234 LIMIT 50'; $ret_Posts = $facebook->api(array('method' => 'fql.query','query' => $Posts)); This code will return you as an array the latest 50 posts with the information that is required, you can increase the limit for more posts. For more information check https://developers.facebook.com/docs/reference/fql/stream

Categories : PHP

Display posts from facebook
To retrieve more Posts in your response from Facebook you may use the limit parameter and specify the number of Posts you would like to retrieve in the response. So, instead of your current call you may change the same to following $pagefeed = $facebook->api("/" . $pageid . "/feed?limit=50"); Which will retrieve 50 Posts in the response. The maximum number of result that you can fetch is capped at 5000, which is also mentioned here in the blog post.

Categories : PHP

Get facebook posts by hashtags
Use this URL: https://graph.facebook.com/search?q=YOURHASHTAGWITHNO#&type=post&limit=999&access_token=YOURMEGATOKENHERE Use Facebook SDK + Facebook APP creator with API ID and secret to generate token.

Categories : Facebook

Facebook FQL Get All Posts At Location
The paragraph you quoted from the doc just says that the table only contains places where yourself and friends of yours have been. It tries to explain that you will not find public users there. A query to the location_post table does not automatically specify the concerned IDs for you. If you want to search for the places where all your friends have been, you will have to indicate all your friends. If you are only interested by a bunch of friends, just add the concerned IDs. This should do it. SELECT id, message, post_id, timestamp FROM location_post WHERE (author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) OR author_uid = me() OR tagged_uids IN (SELECT uid2 FROM friend WHERE uid1 = me()) OR tagged_uids = me()) AND page_id = 303736809

Categories : Facebook

Cant get users posts with facebook php sdk
You need the read_stream permission on Login. so you need to replace your getLoginUrl() call with the following. You could also add more permissions separated by comma, Ex: 'read_stream,publish_stream,etc...' $url = $facebook->getLoginUrl(array('scope' => 'read_stream'));

Categories : PHP

How to print my posts and posts of my friends?
something like this: ids = current_user.friends.pluck(:id) << current_user.id posts = Post.where(user_id: ids) return SELECT `posts`.* FROM `posts` WHERE `posts`.`user_id` IN (1, 2, 3, 6) then in view: posts.each do |post| .... end

Categories : Ruby On Rails

Limit the number of posts from Facebook API
Since string.Format(appURL) contains a Graph API request USER_ID/feed, we can add a field that specify the limit: dynamic feed = _facebookClient.Get(string.Format(appURL) + "?limit=10"); You will find more information about LIMIT here.

Categories : Dotnet

Count friend's posts on Facebook API
You can just query the graph api on https://graph.facebook.com/USERID/posts which will return an array with all the relevant info on each post. That should be enough to get you started at least. Try the graph explorer here... https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Fposts

Categories : Facebook

Does Facebook allow to add posts and update it from another site?
If your site is based on wordpress, there are a lot of plugins for that.. You can also use a facebook app called RSS Graffiti that posts on your FB account anything you post from the site. I don't think by the way that there's something that lets you manage your whole account from outside FB..

Categories : Facebook

Get facebook posts for specific date
You can use time-based pagination. You can read more here (Read Time-based pagination). There is a nice How-To paging with graph API and FQL which can be used for reference. Here is a simple call that pages through posts on the Chick-fil-A Page: https://graph.facebook.com/chickfila/posts?limit=5&since={since}&until={until}access_token={access_token} where {since} is a Unix timestamp or strtotime data value that points to the start of the range of time-based data. {until} is a Unix timestamp or strtotime data value that points to the end of the range of time-based data. {access_token} is users access token.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.