Updating objects previously created through Graph API - facebook-graph-api

I've searched high and low for an answer to this question, but it doesn't seem to be possible. Which I can almost not believe :)
I am building a Facebook integration for my website, and I am creating links through the Graph API. So far, so good. However, when it came to updating stuff, I got stuck; when my content is updated, I want to somehow update the Facebook data too, but I can't figure out how to do this. There doesn't seem to be anything in the documentation about this; I can create new items, such as links and events, I can delete them programatically, but I can't update them. I've tried doing a POST against the object URL (for example, I created a link using https://graph.facebook.com//links, I got back the ID 123456 for my new link, and I then try to update it by POSTing to https://graph.facebook.com/123456). This was just a guess, and it didn't work.
Am I missing something? Doesn't Facebook like updating the objects I created through Graph API? Thanks for any insight you might provide.

It turns out I was on the right track; POSTing to the object itself is the right way to go (the question I linked to in my comment was a big help). I was simply having issues storing the original ID, which meant I was POSTing to an entirely different ID. The lack of documentation from Facebook throws you off and stops you from digging deeper.

Related

Master-Detail (parent-child) Input form with Admin-on-rest

I need help/recommendation for creating an order like input form with MASTER inputs like (order no, date, customer name, address) along with DETAIL info in multiple rows like (Item no, Description, Qty, Rate, Amount).
I am using Admin-on-rest as front-end interface and Loopback for my backend api.
Being new to react/redux and still learning core concepts, I am getting a hard time in finding a good example/starting point to build this functionality. So far, I think this example based on redux-form can help in creating a custom component, but I am yet not competent enough to build this myself.
Any reference to a similar example or some simple code to get me started will be very helpful.
Ref. Image
I think you need this.
How to richly style AOR Edit page
The last answer on the page is a somewhat detailed guide on creating a custom edit component in AOR. Feel free to ask more questions here about how this will be done.
Looking at your design you will need to also think how this data will be updated at the API level. AOR itself will make a single request when you hit save. So how will your API handle updates to multiple models etc.

Has Facebook quietly retired public access to daily_active_users field on the Graph API?

Typically, the Graph API Application object contains the following public fields: daily_active_users, weekly_active_users, and monthly_active_users (see Graph API reference.)
I have been unable to access these using FQL or Facebook's Graph Explorer for a couple of days.
Furthermore, I note that AppData.com's chart of daily activity seems to be broken. I've contacted them to ask what their experience has been.)
Despite this, the fields are still in the documentation and available as part of the (new! improved!) Graph Explorer which might lead one to think that they're still supported.
Has anyone seen any communication from Facebook around this issue?
Is this a very bad sign?
I have exactly the same problem that begun around yesterday or the day before.
AppData seems to duplicate the numbers of the previous days at the moment.
FQL seems to work somehow: (Click this for Zynga Poker)
But this not a good solution - I also need the Graph API back.

Problems w/ Graph API

This is my first post here, so forgive me for stupid questioning or describing my problem not „the programmer's way“. :-)
I've added Facebook comments to my Wordpress blog. Now, I posted a test comment with another Facebook profile than the one I used to create the app.
Voila, the comment appeared on the Graph API of that site. Worked well.
I deleted the comment, but it seems as it's still visible in the Graph API of the site.
Is there any cache for deleted comments!? How can I fix that?
It's important for me to know, because I think of a contest. Users have to add captions to pictures via the Facebook commentbox.
It doesn't give me any benefit, if comments that have been deleted will remain in the Graph API.
Any solution for it? What else do you need to know what I'm talking about? :-)
Cheers,
Axel
You can't delete comments, that's a bit bad documented. All you can do is hide it from other users. Every fb user that is a friend of the user that posted that 'deleted' comment can see the comment as well as the user himself too (in the actual fb comments box).
Furthermore it will exist forever in the graph api! That's facebooks way of pushing freedom of expression!
Anyway if you delete content it doesn't sound like a fair contest to people, as they might feel objected, also not everyone will have the same chances then. A system where you can properly approve 'comments/captiions' would make way more sense. See Diskus for example.
If you wanna have the facebook comments social advertising boost though you could write all comments from the graph api into a database and then approve them manually. Another way would be just to tell users to subscribe/like your facebook page to see who's winning or to be able to win at all. Good luck

Facebook comments box: Possibility to really set num_posts = 0?

I'm using the comments box on my site to get more users socially involved and at the same time I'm reading the Graph API to print those comments on the same site to make it crawlable for search engines. Problem is now that for a real user the comments show up twice (through my graph api print AND through the actual fb:comments plugin box).
Any ideas how I could solve this ?
Would prefer to show only the comment-field from FB and use my own echo to show the comments as this way enables it to REALLY moderate the comments (not just set it to limited visibility). Thanks for any suggestion!
I found some sort of solution for my problem. It's not perfect, but the closest one can get to what I wanted:
Instead of directly returning the query from the Graph API, I attached a script to the comment.create event. This script writes the new comment into my database, where I can moderate again. This way I have to double-moderate, but therefore I don't have any unwanted comments on my site.
I also found out that with the old deprecated comment-box you can set the comments that get natively shown by facebook to 0. That way only the already moderated comments get shown by my own script coupled with my database. It works the way I want it, even for friends of the unwanted commenter.
Hope that helps someone else too!

Accessible Facebook Like Button

Has anyone created a custom Open Graph solution that queries the number of likes and creates an accessible button? Facebook's iFrame and XFBML solutions are both completely inaccessible via the keyboard and screen readers -- and no one seems to care.
The count is super easy to grab, it's the like URL that I'm not sure about. The anchors inside of Facebook's iFrames don't even have hrefs, so I'm currently digging through their scripts for some actionable targets.
Hit this URL with JS or in a browser and you'll get an ID and # of shares (are likes different though? better than nothing i guess): https://graph.facebook.com/http://putyourUrlhere
Any idea how to trigger a like without Facebook's provided code? It's ok if the button is only accessible with Javascript on since screen readers can use JS. Their code obviously requires it anyway. Has anyone done something like this with the Javascript SDK?
I'm trying to figure out if this is even possible, so I'd appreciate any insight!
PS -- iFrames are not inherently inaccessible. The problem is that Facebook's code inside of it is not. http://webaim.org/techniques/frames/#iframe
Facebook finally got around to making the like button keyboard accessible. Just took a while.
https://developers.facebook.com/docs/reference/plugins/like/
It is not supported. Automated likes would compromise the authenticity of the Graph.