Fusion Tables using php Login required Error 401 when inserting - google-fusion-tables

This is what i try to do. select command work but when try to insert it generate
error "Login required Error 401" any example where insertion, updation and deletion is done without this type of error
or any other suggestion which help me
query(SQLBuilder::insert(44444, array('grefid'=>3000, 'distname' => 'xxxx', 'tehsilname' => 'bob')));
?>

I think you need to get the API key...visit the following link to get the same:
Get Google API Key

Related

getting error when enter uri for timeseries ingest

Hi I am trying to save data in timeseries db but I am facing an error at timeseries ingest when I enter wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages in websocket uri it shows an error like this when I click on open socket
The request failed with status code: 500
{
"error": "Error: unexpected server response (401)",
"url": "wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages"
}
and see this screenshot once.
Thanks&regards
Eswar G
From the error log, it looks you got authorization error. Check if you are using correct predix-zone-id of the time-series instance in the request header or you have configured correct UAA instance in predix tool kit.
Have you updated your UAA client with timeseries authorities?
To inserting time series data with particular user or client need permission. For getting permission, you need to add authorities into your UAA client.
Following are the authorities for timeseries.
Experiencing a similar problem. I'm posting only one of several received error messages. I've cycled through combos of the following for uri and zone id:
uri:
wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages
https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/datapoints
zone-id:
44853a54-3ecd-4589-85da-b54f2fda7cce
and the zone id shown in the photo, with .ingest at the end.
so, 401 unauthorized.
Did you happen to re-create the timeseries or uaa? Perhaps they are not associated. Also, I'm assuming you did "login as client" in the top menu.
Might be a good idea to create a new timeseries tied to that uaa. Then use the new zoneId.
Did you add predix..ingest and predix..user to the scope and authorities section in uaa client in your predix.io account. Please check the client id to add permission for in websocketriver.config file.

How to get authentication from user in linkedin?

I am new in creating a application in linkedin. Can some one help in getting the authorization??
I tried this code:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code
&client_id=78lv1rv8ryh1hf
&scope=scope=r_fullprofile%20r_emailaddress%20r_network
&state=DCEEFWF45453sdffef424
&redirect_uri=http://www.mycoolsite.com
I am getting error saying that ...
error=unsupported_response_type&error_description=We+only+support+a+response_type+of+"code"%2C+but+you+passed+code+
There are a few things that can be improved:
you have not URL-encoded the redirect_uri parameter value
you're passing scope= in the scope value, which seems to be a typo/duplicate
you may have inserted a space/line-break in your URL since the following works for me:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=78lv1rv8ryh1hf&scope=r_fullprofile%20r_emailaddress%20r_network&state=DCEEFWF45453sdffef424&redirect_uri=http%3A%2F%2Fwww.mycoolsite.com

Koala::Facebook::ClientError Exception: type: GraphMethodException, code: 100, message: Unsupported get request

I did research on this issue, however, nothing worked for me.
I am using Facebook Realtime subscription and graph API to track my facebook page (using page token).
When a user posts a photo/video I am getting following data pushed by fb to my server:
{"field"=>"feed",
"value"=>
{"item"=>"photo",
"verb"=>"add",
"photo_id"=>302522856593533,
"post_id"=>"824413870916335_302522856593533",
"sender_id"=>100005074631221}}
When I use post_id (824413870916335_302522856593533) to make call to graph API for fetching details of the post, I am encountering following error:
*** Koala::Facebook::ClientError Exception: type: GraphMethodException, code: 100, message: Unsupported get request.
Please read the Graph API documentation at
https://developers.facebook.com/docs/graph-api [HTTP 400]
However, if user posts without photo/video, I am able to get post details successfully. In case, admin posts photo/video, I am able to get details of that post too.
I am sure about the correctness of page token and code. I think, there must be something related to settings.
I have multiple pages to fetch. Tested with both of these methods Koala wiki provides
#graph = Koala::Facebook::GraphAPI.new # pre 1.2beta
#graph = Koala::Facebook::API.new # 1.2beta and beyond
Some pages have ids and some have not in their uris so in a page like this:
https://www.facebook.com/pages/Istanbul-Kuafor/241559912664906
fc.get_object("Istanbul-Kuafor")
gives me the error message you mentioned so I use
fc.get_object("241559912664906")
if page doesn't have an id(some pages don't, somehow), I use the page name and it works this time.

Google Analytic with grub gives me 404 error.

I am beginner to ror development.I am developing small RoR application in which i want to integrate Google analytic. I am using Garb gem for thid
According to gem I used
Garb::Session.login(username, password)// for initial session setup
after that select proper profile
profile = Garb::Management::Profile.all.detect {|p| p.web_property_id == 'UA-XXXXXXX-X'}
but when I tried to get the data it gives me error
Exits.results(profile, :filters => {:page_path.eql => '/'})
// error
Error 404 (Not Found)!!1
The requested URL /analytics/feeds/accounts/default was not found on this server.
How to solve this problem is there any way to handle this situation. Or whether I am doind something wrong?
Need Help.... Thank you.....

How to add comment in website page by API? [duplicate]

I have facebook social comments box. How can I post comment through graph API to it?
I can give you half the answer to this question, but still need the other half very much myself. You can post a reply to an existing comment within Social Comments box by finding its post_fbid. To get this you can use FQL such as:
https://api.facebook.com/method/fql.query?query=SELECT post_fbid, id FROM comment WHERE object_id IN (SELECT comments_fbid FROM link_stat WHERE url ='[ PAGE_URL ]')&access_token=[ ACCESS_TOKEN ]
This query will need to be run through an escape() with the PAGE_URL and then used for an HTTP GET request:
https://api.facebook.com/method/fql.query?query=SELECT%20post_fbid%2C%20id%20%0A%20%20%20%20%20%20%20%20FROM%20comment%20%0A%20%20%20%20%20%20%20%20WHERE%20object_id%20IN%20%0A%20%20%20%20%20%20%20%20%20%20(SELECT%20comments_fbid%20%0A%20%20%20%20%20%20%20%20%20%20%20FROM%20link_stat%20%0A%20%20%20%20%20%20%20%20%20%20%20WHERE%20url%20%3D'http%3A%2F%2Fexample.com')&access_token=[ ACCESS_TOKEN ]
With the post_fbid you can make a reply by doing an HTTP POST to:
https://graph.facebook.com/[ POST_FBID ]/comments/?access_token=[ ACCESS_TOKEN ]&message=[ MESSAGE]
Now for posting a new comment to the page this used to work until recently with an HTTP POST:
http://graph.facebook.com/comments/?ids=[ PAGE_URL ]&access_token=[ ACCESS_TOKEN ]&message=[ MESSAGE]
But currently this is consistently returning:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException"
}
}
I hope this helps a bit and if anyone can shed some light if posting a new comment like this is even possible anymore it would be greatly appreciated.
Seems that it is not possible, and will never be:
This functionality was never and is not intended to be available.
An error message has been added for this case: "Comments may not be
added to a comment plugin"
https://developers.facebook.com/bugs/164794086987157
Its very easy as you post on user feed after getting access_token with publish stream token
I assume you use PHP SDK if you need in other let me known
You just need Step 4 but i give you more details in Step 1 to 3 so you can understand and do clearly
Step 1
get the user access token
$token = $facebook->getAccessToken();
echo "</br>" . 'Access_Token:' . $token;
Step 2
set default access token and profile
$facebook->setAccessToken($token);
Step 3
compile the post
$WallPost = array(
'message' => 'hey this app is cool!!',
'link' => $canvas_page,
'caption' => 'caption',
'description' => 'Test Description',
); // you can also use 'picture', 'description', 'source'....
Step 4
post to wall or your Social Comment Plugin
$response = $facebook->api('/me' . '/feed','POST',$WallPost);
Thanks

Resources