I am trying to create an application that posts specific information on a user's wall. This message should also be visible in the newsfeed, but this part is where it goes wrong.
I 'post' following information to the feed graph:
<?php
array(
'link' => string 'https://www.facebook.com/page' ,
'picture' => string 'http://...../picture.png' ,
'name' => string 'Name' ,
'caption' => string 'caption' ,
'description' => string 'info text' ,
'message' => string 'message'
)
?>
(All the information is filled in with usefull information, but for this question I made it quicker readable).
The information comes on the user's wall, but not in the news feed. This happens also from the user's side of the story: He can see the post on his wall, but not in any feed. Also when we try with other friends.
I also tried to only post a message (without link and picture), but it still is not visible in the general newsfeed.
The auth permissions are set and available (publish_stream) and the permissions are also correct when I look at them on the wall. I use the same code as an older app. Maybe it is a setting on the developer page? Sandbox mode is off...
Can somebody please help me?
Thank you!
I think it may be releated to the fact you're sending a link, apparently FB doesn't like this anymore :
"
Updating a User's Status
You can use this method to simply update a user's status. When you do so, the status message appears at the top of the user's profile and on the Friends > Status Updates page. The message also appears in the stream with your application icon.
To use this method to set a user's status do the following:
* Do not include an attachment or action link. If you do, the story will get published and will appear in the stream and on the user's Wall only. It won't appear at the top of the profile or in the Status Updates page.
* Make sure the message is no longer than 420 characters. Otherwise, an error gets returned.
"
as per http://developers.facebook.com/docs/fbjs/streamPublish/
What Facebook chooses to display on the newfeed is done via algorithm. There are options each user can set to view items in the news feed. Recent Stories first and Popular stories first. If the popular is selected, then facebook algorithms kick into overdrive. If recent stories, then it should display all available stream items (based on other privacy settings) into the feed.
Read this if your still wondering why auto posts and api feeds are not showing on the main news feed to others! Facebook dont like us saving our time they want us to sit on there site and supply quality posts and not focus on our own website!
https://developers.facebook.com/docs/public_feed/
Related
I am using facebook4j to add fb page feed posting capabilities to an existing system. Initially I thought it would just be for posting to pages, which is done, but many pages don't allow posting. In such a case I need to fall back to targeting the individual in a status message. In facebook such a post shows up with heading like "{User's Name} > {Target's Name}".
The problem I'm running into is that even though the facebook graph api has a "to" attribute for a message, I can not find a way to accomplish this with facebook4j. The postStatusMessage() method appears to only accept the id of the feed to post to and the PostUpdate class does not have a "to" property. I could of course be misunderstanding what the arguments represent or how this should be accomplished.
Any suggestions would be appreciated.
I'm developing a webpage of a library which (after the user's permission) tries to post on the user's Facebook timeline by using PHP:
Karen is reading 'Fifty Shades of Grey'
A link to http://www.mylibrarysi.te/book.php?id=4048
I tried with this piece of code:
$out = $facebook->api('/me/feed', 'post', array(
'message' => "Karen is reading 'Fifty Shades of Grey'",
'name' => 'Fifty Shades of Grey',
'description' => "Description of 'Fifty Shades of Grey'",
'caption' => 'A book in your library',
'picture' => 'http://www.mylibrarysi.te/bookcover.php?id=4048',
'link' => 'http://www.mylibrarysi.te/book.php?id=4048',
));
I've two questions:
1) I've just read that Facebook started to stop this possibility to "improve the quality", deprecating "Authenticated referrals" and "Post to friends wall via the API"
http://developers.facebook.com/blog/post/2012/10/10/growing-quality-apps-with-open-graph/
Can my piece of code be banned by Facebook to avoid spam? (users grant me to post on their timelines)
2) The result of my piece of code is
Karen Miller shared a link via MY_APP_NAME
Karen is reading 'Fifty Shades of Grey'
(the link, etc.)
is it possible to remove the "Karen Miller shared a link via MY_APP_NAME" text?
Thank you very much in advance and best regards.
1) You are posting to your user wall, not your user's friends walls. So this should not affect you.
2) The only way to remove the Karen Miller shared a link via MY_APP_NAME text is if you turn your story as an Open Graph action. Read the Open Graph tutorial to understand how to publish app-specific stories. This will allow you to create rich stories like the one shown in Best Practices: Creating Open Graph Stories.
Note that there is a standard OG object book that your application can use, so you can reuse it, no need to create your own object. This will also add the books your app posts about to the list of books that all apps (like Kindle, Goodread, etc) have posted about.
1) Facebook is deprecating the "post to friends wall" - you will not be able to post to the friend of a user. You are posting to the user wall , so this call will work. However, Facebook platform policies don't allow to post with a "message" that was not written by the user inside your application, so you may have the publish privilege removed;
2) This is a link post because you are attaching a "link" to the post. You may refer to the link in the "message" and remove the link parameter. However, by doing this, Facebook won't show the link description with picture.
My goal is to post on the wall of several persons (whether or not my friends) from my application in facebook (made in php) after an event has taken place by a button.
The "Facebook User ID" (FBUID) I get them and I have heard that I can post by the graph api if users gives me permission "publish_stream".
I tried to do with the graph api, using "feed" as follows:
$ fbuid = array (0 => 'first_fbuid', 1 => 'second_fbuid', ......) / / These are ID's that are and are not my friends.
foreach ($ fbuid as fb) {
$ facebook-> api ("/ $ fb / feed ',' post ', array (
'message' => some_message,
'name' => 'My application name',
'description' => 'description goes here',
'picture' => $ imageurl));
}
But when I try to post to people who are NOT my friends gives me an error. Only does the posting on the wall of people who are my friends.
Is there a way to do otherwise by POST to those people? Or can not by restrictions on facebook? Is there another way?
Note: For comments on the website, it says that my own application without problems can post on the wall of people getting the access_token. Can you do that?
UPDATE: If the post to anyone is not possible, so.. Can I send a request to anyone? I think is posible because games like FarmVille do that.
The request can be automatically? Without dialog?
Or if posible to send a Notification to anyone user?.. In the api I see a function called send.Notification.
Think of it this way. The API reflects what a normal Facebook user can reasonably do within the terms of the site, and with respect to the other party's privacy wishes. If you can't post on their wall without being their friend as a human being, why would Facebook want to allow someone to do that through an API?
I would say that this is impossible to do within the usage rules of the API.
Not to mention all of the drama Facebook has with privacy issues.
are you talking about posting on the user wall like this app for example? http://applionaire.me/supporters/
If that's the case, then you don't really need access token to do that.
You would need an access token if you wanted to post on the user wall whether they are logged in to facebook or not.
I am working on an app that creates albums in Facebook and then adds photos to the album. That side of things is working fine.
When the photos are added to the album facebook puts on the users timeline* something like " has added new photos to the album ."
What I would like to do is suppress this message, or at least customize it a little.
Does anyone know if this possible with the Facebook API? I have not been able to find anything in their doco, and suspect it is a automated thing that facebook doesn't give control over, but would like to get confirmation.
Cheers!
*not 100% sure if this is strictly the "timeline" or just their wall.
Use the no_story = 1 parameter.
$newphotodata = array(
'access_token' => $fanPageAccessToken,
'message' => $message,
'no_story' => 1,
'aid' => $albumId,
'image' => '#' . $picturePath);
$uploadedphoto = $facebook->api('/' . $albumId . '/photos/', 'post', $newphotodata);
I am working on this topic myself at the moment. This is my latest on it: http://facebookanswers.co.uk/?p=322
Incidently, have you worked out a way to generate a proper timeline post when you create a new album. If you do it manually, you get a nice post showing four of the images. But if you use the API you cannot get that. You can nearly get it by posting to /links/ but its still not quite right, as friends will just see a single icon.
Well, looking at the facebook api I can find no mention of how to suppress these automated status updates. From this I have concluded that it is not possible to modify or suppress these status updates.
Thinking about it some more I can understand why facebook would not these messages suppressed or changed as it could be abused by apps to make posts without a user noticing.
Just close the window after uploading and open again IE.
I want to get the posts (only from the band, not others) from a Facebook Page Wall (its a Band, so no private profile) and publish it on MY own site.
I hoped to get the Posts as XML or JSON and then parse them.
So I wanted to use Facebook as a news System.
But I didn't find a solution - I don't want to have the user to log in with his account to see anything - it should be just a public stream.
The only idea I found was to use twitter as an export mechanism, but that's kind of elaborate.
Does anybody have an idea?
You could use the Facebook php sdk: https://github.com/facebook/facebook-php-sdk
It ends up looking like this:
//
include('facebook.php');
$fb_config = array(
'appId' => $yourAppId,
'secret' => $yourSecret,
);
$facebook = new Facebook($fb_config);
$feed = $facebook->api("/{$nameOfFaceBookPage}/feed");
That will give you an array of feed stories.
I assume you created a facebook page for your band and it has url in such format:
http://www.facebook.com/pages/<band_name>/<page_id>
In this case you can read wall posts in json format using Graph API (no login required):
https://graph.facebook.com/<page_id>/feed
If you only want posts from "me", can't you just use the Like Box social plugin and show the stream? This plugin will only show posts from the page owner.
http://developers.facebook.com/docs/reference/plugins/like-box
I am developing a similar app and after a lot of searching finally accomplished
https://graph.facebook.com/194466683916784/feed?access_token=AAACTzPZAxblQBAHND7fo1rA58VqQawuJb806Q6BeIFhTroyGSYIe5i0R5fZAZBtffNvkkZB7ayvV7Vw7j7ZBf7vGt6xHx2gjx4FhO8d27sAZDZD
enter your page wall id after .com and in the access token get your own access token from Graph - API explorer
Then exchange that token for a longer for a longer lived one that is for 60 days and you are good to go
Some time ago I had your same problem and I was looking for something very simple to publish feeds of facebook pages, but I didn’t find any solution on the web.
What I want to achieve are the post (only from my personal fan page, not the other) of the bulletin board (facebook wall) of a FB page (this is a fan page, not private profiles) and publish it on my site.
I was hoping to get the posts in JSON or XML format and then encode them so as to use FB as a news system. Unfortunately I haven’t found any kind of solution because I don’t want the user has to log in his account to see something so it must be a flow of pubblic feed.
So, I decided to code the plugin. Here the link to the tutorial:
http://www.lorenzodedonato.com/freebies/facebook-plugin-per-visualizzare-i-post-della-bacheca-di-una-pagina-fan-creato-in-php-json/