Facebook Graph Api: Get Pages I am Admin Of - facebook-graph-api

I have searched about this topic a lot, but I did'nt got any solution that suits my needs.
What I want is, when I call me/accounts , it gives me all the pages and apps I am associated with. But the thing is, I want to get only those pages of which I am an Admin not those in which I am linked as a Developer or a QA. I got a workaround to use isAdmin method once i get the page ids, but that takes a lot much time to check for each page.
Can I get something that can help me to get all pages I am admin of in one call. Its really critical.
Thanks for your help in advance guys.

You can do this pretty easily with FQL.
SELECT page_id, role, type FROM page_admin WHERE uid=me() and type != 'APPLICATION'

Related

How to store and display map location in wagtails

I am trying to create an API for contact us page. The API take location through map click at wagtail admin panel and send API too. For now I want to know how can I ask user to pin a location and store it in my model. I cant think of anything to do.
class Contact_UsPage(Page): pass
My page name is Contact us thank you.
I tried looking at official wagtails documentation and couldn't find anything that would help me.
Not sure what you are doing but Googling "wagtail maps" returned some interesting looking options - including this blog post https://torchbox.com/blog/simple-maps-wagtail-google-and-geopy/ and this CodeRed block https://docs.coderedcorp.com/wagtail-crx/features/blocks/contentblocks/googlemap.html

Facebook API : page feeds

I would like to integrate Facebook page's feeds to my website.
I'm trying to use the Graph API, everything works fine, but I cannot get the attached pictures (picture field).
/v2.6/{page_id}/feed
But I only get the id, created_time and message fields.
Can someone helps me with this ?
I probably miss something but I cannot found what.
Thanks by advance.
/v2.6/{page_id}/feed?fields=message,picture,...
You don´t get the additional fields if you don´t ask for them.
Existing fields: https://developers.facebook.com/docs/graph-api/reference/v2.6/post

How to change the "link" parameter on a Facebook page graph

How can one change the opengraph link value on a Facebook page (type: website) from
https://www.facebook.com/yourwebsite to http://www.yourwebsite.com
It seems easier than it is. I couldn't find an answer. Seems it has something to do with adding an app, and then?!
Example: http://graph.facebook.com/anguillabeachescom
I can’t see that being done anywhere on the page’s settings interface.
My guess would be you have to claim your domain with Facebook to make things work this way (and maybe have to have a special category set for your Facebook page – the example page you mentioned is of type “website”.)

Facebook Page - Get Post feedback and impression via Graph API

I'm trying to get some insights on a list of Posts by a Page on Facebook.
To be specific, I want to get the information highlighted in this blog post via the API.
But I can't figure out how, anyone knows how?
As far as I know it's only possible using the "stream" table. So you've got to use FQL to query this data. Using this technique you'll only get the impressions directly. Feedback rate can be calculated by adding #comments and #likes and dividing the result by #impressions. Hope they'll add this to the insights graph api as well.
MartinHN
Refer to https://developers.facebook.com/docs/reference/api/#analytics
If you are trying to aggregate multiple pages or a page other than the requesting app then you may need grant read_insights permissions to your application.
Refer to http://developers.facebook.com/docs/reference/api/insights/

Django url image extraction like facebook

Does anybody know if there is a pluggable app that you can use to achieve url like image extraction for Django?
I dont know if there is a pluggable app that will do this for you, but you can probably hack this together yourself.
The only 'standard' I know of that facilitates this is oEmbed (http://www.oembed.com/) which basically works this way:
somebody gives you a URL.
you read it, find that its a valid JSON that matches the oembed structure
success!
other than the above, and what I think facebook does as well (since I took a look at a few sites that both twitter and fb would work with and none have any oembed support that I can see), is to work on a case by case basis. They probably had a developer go through a large variety of sites and look at the type of meta tags available. for example, yfrog has a bunch of meta properties that tell you the url directly to the main image being displayed, the owner, the tweet that went along with the image, etc. After that it's best effort guesswork. that's why when you try to share a blog post on facebook, it'll often give you the option of any one of the images that went with that blog post, because it doesn't know which one is the main one.