I want to check if a certain post, given by its permalink, still exists in a group on facebook.
I tried with lynx and wget, expecting a 404 if the post had been deleted, but I got the message "your browser is not supported". Amazingly, facebook uses around 500k of javascript with trackers, arrays of language translations etc...
I've been looking at graphAPI, but it appears I have to make an app, which then have to be approved by facebook, then installed by an admin in the group.
Neither of these things are likely to happen.
Are there any "3rd-party" API's to facebook which allows (read-only) access to a facebook group as an user?
My last option is starting a VNC-session, start a browser, log into facebook, then periodically feed the browser an url from a table, wait a few seconds, capture a section of the screen, and if there is no text on it, (i.e. all white), then the message is gone.
This is possible; I've done it before to check if a list of websites produced the desired result and generate a page of miniatures.
Related
We are having a problem with the review of our app which needs FB user's authorization to publish a post to his wall (publish_actions permission rejected by FB reviewer). The post is a promo offer developed by some retail store which is generated on server and needs to be put on user's wall.
We are seeing this in many cases by apps that are approved by FB but the reviewer has stated this: 'Make sure the user message area is not pre-filled in any way by the app otherwise the submission will be rejected. This includes hashtags, URLs, and any other text not written by the user.’
What we see in many cases is that the message is pre-filled with text from a publisher so that when its posted to the wall you see an image with some text including a link to the FB page of the publisher. Does anyone know why we are not allowed to do the same?
Prefilling is not allowed. It does not matter if you see it in another App, it´s still not allowed. If you believe an App does it, report it to Facebook.
Also, the user profile is not a place to advertise, each and every single post to the user wall must be written and authorized by the user. You can only add a link with Open Graph tags to it. See the docs for information about all the possible parameters: https://developers.facebook.com/docs/graph-api/reference/v2.3/user/feed#publish
When an app (i.e., mine, FriendCaster, GraphAPI) posts to the feed for a page a user likes, the post_id is returned & I can always see the message show up on the page -- when viewed from the browser.
When I attempt to read the page feed from any apps however, those same posts don't all show up. Sometimes I'll see the first couple of posts from the app, then nothing after.
Furthermore, if I try to use Graph API Explorer to show the status with the post_id returned from the successful post, it either returns an empty object, or the generic "Unsupported get request.", code": 100.
I've tried all settings for the app default privacy, with no change.
I've also tried setting all permissions on the app, but no improvement.
Suggestions?
Opened a Facebook bug with this information & the cause appears to be the spam filter kicking in (albeit a bit clunkily)
This is by design. Posting too many times to a page repeatedly will be marked as spam.
Unfortunately, there isn't a way for a page to whitelist apps that it would allow frequent posts from.
As mentioned in my comments above, this raises a couple of other issues that I'll follow-up on at the FB site.
I am building a social application, users post data to the website, which is saved in our database.
This creates a record on the site, which is searchable and creates the basic content and function of the site (the purpose is not relevant at this point)
When a record is saved to our database, I want to "spread the word" and send this data out to social networks. Currently, I'm looking at Facebook in isolation.
So, I know how to create a post through the Graph API and post this content to the users Timeline, or indeed to a business page associated with the APP/Website.. but I am not sure how, or if indeed one should, maintain continuity.
What I mean... if a user creates a record on my website, and then the website/App creates a post on my business page, and also asks the user to post it in their Timeline, how do I stop this being two separate posts, and instead one post which has been shared?
I want to achieve:
User posts on website
>
Website posts to Page
>
Post on Page is "Shared" to users Timeline
As opposed to:
User posts on website
>
Website posts to Page
>
Website posts an additional post to users Timeline
The reason I want to do this, is that on the website, I want to be able to show shares, likes and comments from Facebook by tracking the ID of the initial post created when first entered onto my website.
Or am I trying to reinvent the wheel and should just use Facebook's comment plugin?
When you create the post on facebook on the Page, store the returned post ID in your data model.
From what I can tell, there is no way to access the normal user share directly through the API. If you insist on doing it programmatically without popping up any dialog for your user, you can make a post to the user's page which has (the start of) the Page post and a linkback to the Page post as an attachment. This is probably to prevent abuse.
However, if you don't mind relying on an undocumented and deprecated endpoint, you can use the old sharer.php endpoint, so long as you have a fully qualified link to the post you want to share (you can retrieve the url through the api). This will also require your user to enter anything appropriate in their share and then click "share."
The endpoint is
http://www.facebook.com/sharer.php
Call it with the u parameter filled in with the url, so
http://www.facebook.com/sharer.php?u=[URL encoded URL of the post you wanted to call]
You can try this with any facebook post (go to a post, copy the url, past in as the parameter), it's still working (I just tried it) but there are no guarantees. See the top answer to Facebook API: "Share" a post already posted on a page's wall?.
You can still access likes, comments, etc for that post id through the Graph API (and you can provide your users a direct link to the post). Cache/update them as recommended and display them on your own page. You are basically mirroring back onto your own site what is happening on facebook in regards to the post you made.
I would go this route especially if you are at all planning on branching into other services. That way you can do an aggregated display of statistics/likes/etc from the multiple services you are having your platform repost to. This is also good for (at least an impression of) data integrity for your users: they know that your service represents everything they have done in case anything happens to their facebook/etc accounts.
This could especially be noteworthy if they are worried about facebook/etc deleting any of their posts, or for recovering from any issues where a post/comment/etc is not properly stored by facebook/etc (for example, comments have a maximum length which, at least via the main FB UI, silently drops anything above the maximum length in a non recoverable way for the user).
Facebook Like Box feed is empty despite there being many post by the page, or only shows posts when logged out of Facebook.
In one case the feed only shows posts made on the iPhone with location info (despite these being months older) and shows no other posts. It does this not only on the website were I have the feed embedded, but on FB's dev page preview where the like box code is generated.
This problem exists the same in all browsers.
So two solutions to this problem.
Note: not all FB pages are alike. Selective rollouts of new FB features are applied to certain pages progressively or by creation date. Thus why this problem doesn't appear in all pages.
Two causes for this feed problem:
Being logged in as an admin can cause the feed to not show all posts. Thus the problem doesn't exist for non-admins. Logging in as a non-admin or without any FB login at all shows the feed normally as it should be.
(in one case I worked with, only posts made by iPhone with Location info would show to admins, while all non-admins saw every post for the page).
Feed inactivity. If no posts have been made in a certain amount of time(I don't have an exact timeframe) the feed will show nothing, not even the "Show More" drop down. On one project (observed in Feb-March 2012), simply creating a new post fixed it instantly. Not sure how permanent or temporary this glitch is, or whether FB is/has fixed it.
Also, not sure what (if any) correlation this problem might have to linked twitter, tumblr etc accounts.
I've been looking at the Facebook API to find some way to edit a user's Likes (that is, add or remove items from https://graph.facebook.com/me/likes/). The API doesn't say anything about it specifically, but does say this:
You can publish to the Facebook graph by issuing HTTP POST requests to the appropriate connection URLs above.
Where above, one of the connection URLs is the aforementioned https://graph.facebook.com/me/likes link. However, there's no documentation for the PROFILE_ID/likes post, and whenever I try to post it returns the error "invalid post_id".
I assume this is because to like something, you post a request to POST_ID/likes. It's a bit inconsistent. What I'm trying to do is get the user's profile to add a Page to their likes (by posting using the page's id as an "id" parameter in the post body). However, it seems like there's just no way to edit user's likes.
At the end of the day, I just want to allow a user to click a button in my application (mobile device application, not a web app) and have them add our Facebook page into their list of pages, and I've found no way of doing that short of presenting our page to them and making them click on the "Like" button manually. Many other things are supported without showing the Facebook website, like posting to their wall or making albums, but I can't find anything to do this.
Any ideas?
Looks like I can't. Not in the way I want to anyway.