I am able to post a message successfully on a USER wall :) , from the code I am trying to get the status detail which posted thru my application .
Here is the Id for the status message I post on user wall : 557671002_10150464779501003.
When I try get the details about the status message by accessing : https://graph.facebook.com/557671002_10150464779501003 , I get a result as false.
How to get details of status.
You have to request the read_stream permission in order to extract information from a post on a users feed.
Try grabbing it using the access token:
https://graph.facebook.com/557671002_10150464779501003?access_token={a valid access token}
Related
I have a node.js/express application that's using JWT as authentication.
When my user logins it displaying their information using "user_id", I have an update method that will update that users information "first_name", "last_name" by getting that "user_id".
When I run my update method, the information gets updated but it requires my user to log out and log in to see the updated information.
The best approach can be one of those two:
1 - Do an update request and, if this succeeded, return the updated information in the response.
2 - Do an update request and, if this succeeded, after receive the 200 status code do a "getOne" request passing the user_id.
You need to replace the state of your frontend.
I don't know what you use on the frontend, but if were some javascript framework, the two-way databind will do replace for you.
If you use another tech such PHP, you need to refresh the page with the new information.
during the process of discontinuing our node we need to retrieve the user emails in order to notify them to migrate their VM's.
We have tried using keystone user-list after sourcing our openrc config file but to no avail.
Is there a command sequence we should use in order to retrieve what we need?
There is an way to get the information about the users that can be using your node. The steps that you should follow are the following:
Get the id of your region from the GET to http://cloud.lab.fiware.org:4730/v3/OS-EP-FILTER/endpoint_groups
Get the complete list of projects in your region: GET to http://cloud.lab.fiware.org:4730/v3/OS-EP-FILTER/endpoint_groups/{{Region-Id}}/projects where Region-id comes from endpoints_groups[i].id in the previous JSON response.
Get the user of those project, for each project: GET to http://cloud.lab.fiware.org:4730/v3/role_assignments?scope.project.id={{project_id}}, where project_id comes from projects[i].id in the previous JSON response.
Get detailed information of the user: GET to http://cloud.lab.fiware.org:4730/v3/users/{{user-id} where user-id comes from role_assignments[i].user.id in the previous JSON response.
Keep in mind that all the operations have to be done with the corresponding X-Auth-Token.
I hope that it can help you.
I've been using String(contentsOfURL: NSURL) to retrieve the HTML file of a website (a post on Instagram like this one https://instagram.com/p/5FcnSATPa4/ in my case). I need some information about the post like how many likes the post has received or the location associated with the photo.
This line of the HTML file, for example, contains some of the info I need \"location\":{\"has_public_page\":true,\"name\":\"Kaputa\\u015f Beach\". The question is: how can I extract that "Kaputa Beach" name?
Thank you.
Why not use the actual Instagram API? https://instagram.com/developer/endpoints/likes/
Why spend time parsing the HTML when you get that information straight from the source.
You can authorise using OAuth (https://github.com/dongri/OAuthSwift)
You could retrieve a list of users who have liked an image using the call below, you can then derive the 'like' count from this:
https://api.instagram.com/v1/media/{media-id}/likes?access_token=ACCESS-TOKEN
Alternatively if you want more information on the media, you can use the following endpoint:
https://api.instagram.com/v1/media/{media-id}?access_token=ACCESS-TOKEN
Details here: https://instagram.com/developer/endpoints/media/#get_media
Here is an example of a swift app using the Instagram API, you can check out the project on GitHub to see how it works.
https://maniacdev.com/2015/01/example-a-swift-based-ios-instagram-photo-downloader-and-browser
EDIT:
You don't need to authenticate as a particular user to use the methods you need.
Login to instagram as yourself:
https://instagram.com/accounts/login/
Register a new client: https://instagram.com/developer/clients/manage/
Use your new client id with requests instead of your access token:
https://api.instagram.com/v1/media/{media-id}/likes?client_id={CLIENT_ID}
or
https://api.instagram.com/v1/media/shortcode/5FcnSATPa4?client_id={CLIENT_ID}
You can make up to 5000 requests per hour with your client id.
You can play around with the Instagram API here: https://apigee.com/console/instagram
Just remember to use your client id.
I am trying to get a message via a message id by using Boto.
This question:
Trying to Get SQS Message ID with Boto
Makes me think that Boto might have a way to get a message by a message id, but I can't find anything in the Boto documentation.
Is there anyway to get a message via message id?
No, there isn't. The SQS API does not provide a way to retrieve a message body given a message id. All you can do is read messages from the queue.
The question you link to is about how to get the message ID from a message that you have already read. That is possible and the details can be found in that message.
I dont know what exactly your problem is, however, in my case:
I am getting about 20 messages at once from Sqs and processing them asyncronously. When a message done, I want to delete it from sqs. So, I put the progressing message to a HashMap with Id value.
When I am done with message I get it from Map easily.
If you have Id of message, you should also have Message object before. And If the range of Message count is not so much you can also use Maps.
Message msg = onProcess.get(processId);
sqs.deleteMessage(new DeleteMessageRequest().withQueueUrl(queueUrl).withReceiptHandle(msg.getReceiptHandle()));
onProcess.remove(processId);
Sorry if this has been answered but I've been googling for a while and can't seem to find anything. I'm wondering how to send a GET & POST in the same cURL payload if that's possible? In other words, send a GET request from one website's API (in my case returns json data) and then have this post to another application all in the same request. Basically I'm trying to do the same sort of thing that IFTTT does, for ex. when API-a posts news story, then post news story to API-b.
Basically, I can currently send a payload of the text for the url that I'm trying to get to a webhook, but what I'd like to do is have the payload GET the info from a URL then POST this to another url. Is this possible in the same payload?
No, it is not possible with HTTP.
You need to first get the results of the first transfer and then send that to the next one, but you can indeed do that in a single command line if you'd like. Something like this:
curl http://1.example.com/get.html | curl -d#- http://2.example.com/post.php