php linkedin api not working - php

I found a repo:
https://github.com/mahmudahsan/Linkedin---Simple-integration-for-your-website
in copied the OAuth.php and linkedin.php files and put my api key and secret into it and here is what I'm getting:
My Profile Info
404
1454454187300
N0JYR99YQA
0
Could not find person based on: ~
Performing search for: ?company-name=facebook&count=10
Search URL: http://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,picture-url,site-standard-profile-request,headline),num-results)?company-name=facebook&count=10
Look people who worked in facebookSimpleXMLElement Object
(
[status] => 403
[timestamp] => 1454454187323
[request-id] => DTH9GFLY2T
[error-code] => 0
[message] => People search must be done on behalf of a member.
)
any idea what i could be doing wrong?

Related

How to get my PayPal account's transaction history via API

I want to get my PayPal accounts transaction history. Just the same data I can export when I'm logged in.
All the transactions there where not generated via REST API itself.
I read some posts where it says that one can't use, for example, "Transaction Search" API (https://developer.paypal.com/docs/api/transaction-search/v1/) in this case.
I tried this out but could not get it to work.
After I got my access_token:
stdClass Object
(
[scope] => https://api.paypal.com/v1/payments/.* openid https://api.paypal.com/v1/vault/credit-card/.* https://uri.paypal.com/services/subscriptions https://uri.paypal.com/services/identity/activities https://api.paypal.com/v1/vault/credit-card
[access_token] => xxx
[token_type] => Bearer
[app_id] => xxx
[expires_in] => 32400
[nonce] => 2020-09-05T22:25:09ZHAnra0QUpsxgo4E90gqEKtgtUNgkGNzVs1IVCBJfiu0
)
I tried to call the /v1/reporting/transactions API an got back:
stdClass Object
(
[localizedMessage] => No permission for the requested operation.
[suppressed] => Array
(
)
[name] => PERMISSION_DENIED
[message] => No permission for the requested operation.
[details] => Array
(
[0] => stdClass Object
(
[field] =>
[value] =>
[location] =>
[issue] => No permission for the requested operation.
)
)
[information_link] => https://developer.paypal.com/docs/classic/products/permissions/
[debug_id] => feb53d91bc653
)
The "information_link" in the response ends up at 404.
And yes, I activated "Transaction Search API" in my Developer Account.
Then I found this old API:
https://developer.paypal.com/docs/archive/express-checkout/ht-searchRetrieveTransactionData-curl-etc/#
There, PayPal says that this API is deprecated but will still work ... for customers who are using it.
For me, this also does not work, response:
{
"name": "INTERNAL_SERVICE_ERROR",
"message": "An internal service error has occurred",
"debugId": "a2b554e8cc7b",
"links": [
{
"href": "https://developer.paypal.com/docs/api/overview/#error",
"rel": "information_link"
}
]
}
So how to get existing PayPal transactions of my PayPal account via API? There must be a way, there are many tools who import this data, but which API do they use?
I tried this out, it don't worked, I could not get the data.
And yes, I activated "Transaction Search API" in my Developer Account.
After activating it you need to wait 9 hours, and ensure you get a new access_token that is not the same as your old one. You should then have a new [scope] returned which includes https://uri.paypal.com/services/reporting/search/read
Without that scope returned, you can't use the Transaction Search API.
There must be a way, there are many tools who import this data, but which API do they use?
The Transaction Search API is actually not very useful -- most people use the Reports tab in www.paypal.com and download a CSV file

Facebook message send API

I am trying to develop PHP Application through which I want to send message to any individual Facebook user.
I am using below API: https://developers.facebook.com/docs/messenger-platform/send-api-reference/text-message
I am following this one while developing my app: http://www.phpgang.com/facebook-messenger-api-for-pages-using-curl-php_3929.html.
But when I am running my application it throws error:
Array ( [error] => Array ( [message] => (#100)
No matching user found [type] => OAuthException [code] => 100
[error_subcode] => 2018001 [fbtrace_id] => Ha3u2Mvk1ZF ) )
Please somebody help, I am stuck in this.

Shopify is giving error 400 [Bad Request] when using https://{shop}.myshopify.com/admin/oauth/access_token

I was developing a Shopify App. It was working fine till yesterday evening, but then I started getting the Bad Request [400] error, after the user allow access to the app for his shop.
Error is below
(https://SHOP-NAME.myshopify.com/admin/oauth/access_token) in /path/to/shopify/authentication/oauth.php on line 28
Array (
[method] => POST
[uri] => https://SHOP-NAME.myshopify.com/admin/oauth/access_token
[query] => Array ( )
[headers] => Array ( )
[payload] => Array (
[client_id] => {CLIENTID}
[client_secret] => {CLIENT_SECRET}
[code] => {CODE}
)
)
I'm doing a POST cURL Request with Content-Type:application/x-www-form-urlencode and all the request are validated to be coming from shopify.
If anyone want more information I can provide.
Thanks.
If this happening after the user authorizes the app, it could be an issue with the permanent token they have received. You could try grabbing the token that is generated and doing a POSTMAN request manually to query the API to verify the token works.
If it worked before and you didn't make any changes to the app, it could be a temporary API issue, even though I found that to be rare with my app.
The code parameter that is sent from Shopify can only be used a single time.
If you re-make the original request that sends the code parameter to your server, you should be able to make the call successfully.

How I can check that user has already liked page without user_likes permission

I also try get data from getSignedRequest() (PHP-SDK 3.4) but page data is empty in response:
Array
(
[algorithm] => HMAC-SHA256
[code] => AQC94XuRCkLCYkJkBU2j2JvR_H0dEesyyWE9IOnBorRExZyjDhRR1M5JnG5CiWLf12xuO0CiFzVva05D-L3NNuId-IbOg4VO8X-DENRlbj3CiSIzBn....
[issued_at] => 1408109031
[user_id] => 6660247934796
)
The 'liked' property will no longer be returned in the 'signed_request' object for Page Tab apps created after today.
https://developers.facebook.com/docs/apps/changelog
See v2.1 updates, Fangates are not possible anymore, and not allowed according to the platform policy of Facebook.

How to retrieve a specific discussion from linkedin group using PHP

How can I retrieve a specific post/discussion from a open group through LinkedIn API using PHP.
I was trying with the following API request as shown in here http://developer.linkedin.com/documents/groups-api#post :
https://api.linkedin.com/v1/posts/5835685921059532803:(id,type,category,creator,title,summary,creation-timestamp,relation-to-viewer:(is-following,is-liked,available-actions),likes,comments,attachment,site-group-post-url)
But this returns the following error:
Array
(
[status_code] => 400
[data] => stdClass Object
(
[errorCode] => 0
[message] => Invalid Post.id String {5835685921059532803}
[requestId] => XW2XMPBNKY
[status] => 400
[timestamp] => 1391441328953
)
)
Now, what's the error I have made with this request? What should I do to get a specific discussion?
Thanks.
I just solved the problem. The problem was while making the request. The discussion id (5835685921059532803) I was sending with URL was in wrong format. It should be like: g-GROUP_ID-S-DISCUSSION/POST_ID, for example: g-24405-S-5835685921059532803.
So the URL should be:
https://api.linkedin.com/v1/posts/g-24405-S-5835685921059532803:(id,type,category,creator,title,summary,creation-timestamp,relation-to-viewer:(is-following,is-liked,available-actions),likes,comments,attachment,site-group-post-url)
Hope this would save someone's valuable time.
You need An Api key and Secret key,to get an AUTHORIZATION_CODE,using that AUTHORIZATION_CODE,you will get an Access Token,and with that Access Token if you hit the url,then you will get the proper data,
details http://developer.linkedin.com/documents/authentication

Categories