I'm using the API from the following site in order to connect to LinkedIn:
http://www.whitneyland.com/2011/03/iphone-oauth/comments/page/2/
But i'm trying to find a guide to learn how to get the list of contacts using xcode but couldn't find anything...
Can anyone direct me to anything?
Thanks,
See the Connections API from LinkedIn's Docs.
The Connections API returns a list of 1st degree connections for a user who has granted access to his/her account. You can control the fields you want to have returned and the number of connections returned for each call.
Related
I’m trying to use Foursquare online API, which I need to retrieve the property of the count of users are at the current venue.
However, Foursquare’s documentation related to Venue here draws a confusions for me.
First, is it possible that when I do a HTTP request, I do the request with userless authentication, i.e. parsing the parameters with just the app's client_id and `client_secret?
Any quick explanation, (greater appreciation for those who even provide some code examples) regarding this confusion will be appreciated so much!
The herenow endpoint requires an acting user. See the Foursquare guide on authentication for more detail about how to get an authentication token to make an API request as an acting user.
Access tokens allow apps to make requests to Foursquare on the behalf
of a user. Each access token is unique to the user and consumer key.
Is possible to find out whether some facebook page is live streaming right now? I was looking at Facebook API and from there it seems to me that it is not possible since /{page_id}/live_videos seems to be working only if you are an admin of the page (or you have been granted the access) since you cannot read live videos of public without page access token.
Yes, you can. This is actually called a WebHook (simultaneous notification of a certain app/user about changes made on the page). To do this you will have to create a Facebook App that will be subscribed to the changes made on a certain page that you want to track.
You can simply do this from the dashboard of the app or through Graph API 2.7(since this version supports live_videos) calling {app-id}/subscriptions and choose any of Page Object Subscriptions, which are available through Facebook API(in your case live_videos).
For this kind of subscriptions your app needs to be whitelisted in order not to spam or re-transmit the information received from a certain page.
To get more information about WebHook implementation please read Facebook API documenation: https://developers.facebook.com/docs/graph-api/webhooks
I know this is quite late already but for those that may stumble on it like I did, Yes it's possible.
As clearly stated in the documentation
Page Live Videos - Facebook API Documentation
You will need to make a GET Request to the endpoint below with the appropriate parameters:
https://graph.facebook.com/v6.0/{page-id}/live_videos
Where page_id is the Facebook Page ID you with to check for active Live Stream
The endpoint also expect broadcast_status whose value for your use case would be LIVE
Note: You will need and app setup on Facebook for developers platform and your query would have to be via the app
Further details can be found in the documentation whose link I provided at the initial part of this answer.
You might be able to get a returned string if there is any, from:
GET /v2.7/{page-id}/live_videos HTTP/1.1
Host: graph.facebook.com
You can read more in: https://developers.facebook.com/docs/graph-api/reference/page/live_videos/
I want to pull ad data (campaigns, ad sets, & metrics like clicks/impressions/ctr) from Facebook using their API and put it into a database. Facebook's documentation says I need to create an app on their site in order to access the API, but that doesn't seem right. I'm not trying to create an app for my fb page, just want to extract data.
My first choice was to use an ODBC driver from
CData
, which does allowed me to successfully pull data from AdAccounts but threw an error when trying to get AdSets or AdStatistics:
OAuthException Code 10: You do not have sufficient permissions to perform this action.
I made sure to add in a target='act_{myAdAccountId}' parameter to the query, as per their documentation, but it didn't help. I figured this meant I didn't configure the driver properly, so maybe I'd have better luck just coding up a solution in python or php.
Next, I tried to run similar API calls using the Graph API Explorer and got the same error message. I created an access token that had all the extended permissions and then made a request to
GET /v2.4/act_{myAdAccountId}/adcampaigns.
This gave me the exact same OAuthException Code 10 error that I was getting through the ODBC Driver.
Can someone confirm whether it's possible to pull data from the API without building an app? If so, what permissions do I need to enable for my account? I'm already an Ad Account Admin in the "Ads Manager", and couldn't find anywhere else to set permissions.
Thanks!
Apps have no direct relation to Pages. You need to create an App for any API access. I did not use the Ads API yet, but i assume you need to use the ads_management permission with your App.
How to create Apps and authorize with the required permissions is explained in the docs: https://developers.facebook.com/docs
Since you asked about Login Review, all the information you need about that can be found in the docs too: https://developers.facebook.com/docs/facebook-login/review
I understand this is an old post, but in case if anyone was looking at a similar situation, I was able to call the Facebook Marketing API without building an app.
I posted a similar answer on another more recent question (Do I need a publicly accessible webserver in order to user Facebook's marketing API?), and was curious if this situation puzzled anyone else, which led me to here.
I wrote my API calls using Python 2.7 on Juypter notebook, and I just followed Facebook's Marketing API documentation and examples, modifying with my access tokens and account information.
I am very new to Facebook Ads API so some help or advices about best practices I can use in my case would be appreciated a lot.
The situation:
We have multiple clients that are running advertising campaigns on social sites and Search Engines like Facebook, LinkedId, Google Adwords, Bing and etc. They want to have information from all their campaigns in one database and use this database to run various reports in order to manage their campaigns better (move money from one campaign to another and have better results). So basically we need to perform daily (or should I say nightly) sync. Also we need to mark adds in Facebook that are part of campaigns that are running via our tool (also not a problem to do once logged in). This is done automatically.
That is not a problem in many platforms - we use Google and Microsoft API to connect to the platform, read required data on daily basis or do some changes to URLs automatically.
The question
I was a bit surprised to find out that in Facebook Ads API the only way to authenticate is via tokens that expire quite fast (long term tokens last for 60 days). I am wondering if it is possible to authenticate via API with user name and password or obtain the ticket that is not expiring. The reason - most of our processes will run on nightly basis so any interaction with user to get fresh ticket is not possible.
Asking for permission every 60 days also seems like not an option and offline_access privileges that would suit us perfectly are no longer supported as I understood correctly from the documentation.
So what are authentication options? Is the only possibility to ask user to re-confirm our access rights every 60 days? Is it possible to get access permission once and live with it until user revokes it, or this is not possible?
Thanks in advance for your answers and suggestions!
Facebook did an exception for ads api access tokens. It is still possible to get neverending access token. Reed more here https://developers.facebook.com/roadmap/offline-access-removal. Also, you can check access token type, expiration date and other params here https://developers.facebook.com/tools/debug. Our access tokens shown as Expires: Never.
I am still new to Facebook Graph API, and trying to start using facebook places search. (search places by location)
https://graph.facebook.com/search?type=place¢er=37.76,122.427&distance=1000
One thing i have noticed is user have to login to their Facebook account to do the search, otherwise the search will be rejected.
Could anyone shine me some light pointing a direction to work around this?
Any links or articles will be appreciated.
Thank you
Yeah, unfortunately I think this is a design flaw (or feature?). By this design, only Facebook authentication users can search for places. Others cannot. It seems more like a capability designed to serve end users than actual apps.
The flaw I see is that many applications out there are trying to offer optional Facebook integration but don't make it obligatory. Unfortunately, as it stands now, the places API can't be used as a service for apps just additional functionality for FB users.
What you are trying to do is not possible. Per the error message: "An access token is required to request this resource." Most of the graph api requires an authenticated user (ie an access token) to make requests. There are only a few calls that can be made without the access token and this is not one of them.