Unable to fetch user data by using tiktok-scraper npm package - javascript

I have used tiktok-scraper for getting any public TikTok users data. It was working fine recently and I was able to get the required data but suddenly it stopped working and started giving this error:
Error: Can't extract user metadata from the HTML page. Make sure that the user does exist and try to use proxy
The module that I have used is .getUserProfileInfo('USERNAME', options) without using any options. Earlier I was able to get user details by just passing the username.
Someone has suggested to try using the cookie "sessionid_ss" in the sessionList option but I don't know where can I get this value from.
It would be great if someone can guide in this regard to get any public TikTok users' details based on the username.

Related

error when I try to fetch calendar events through google API, JS React

For some reason; I get error when trying to get my calendar events through google API. I code in JS and use React and have no idea why it does not work.
I have the token stored in sessionStorage and do get personal information about the user like name email and such stuff but I cannot proceed and get the calendar events. Please help!
I'm not sure what exactly you would like to see inside my App but let me know and I'll provide with the stuff because I do not want to upload the whole project lol
https://gyazo.com/37433e19f07e441adf368d1bbcad78e6
Maybe try to return res.send as you use async/await and it returns promise
I changed the structure of the app and I do now receive cal events when I hit one of my endpoints, but receiving other kind of error now, anyway this one can be closed.
Cross-origin request blocked, origin 'null' no access

How to parse error with Square Connect API example (Node)

I am trying to learn how to process payments with Square, and am trying to run their examples from GitHub to get a feel regarding how to structure the payments application. I built the node example from here: https://github.com/square/connect-api-examples/tree/master/connect-examples/v2/node_payment using npm install and npm build to get the app up and running.
I am using "4532759734545858" for the card number, "123" for CVV, "0120" for expiration, and "94103" for the zip. I got the card number from here: https://docs.connect.squareup.com/articles/using-sandbox where it states that this is a good number to use for a Visa sandbox.
Also, I have updated the config.json with properties from my developer settings.
When trying to process a payment a get a DOM element that says "Card Declined" without further specifying the error. Is there something I can do to parse the error?
Based on the documentation at: https://docs.connect.squareup.com/articles/using-sandbox#generatingerrorstates it seems the amount_money field of the request is not being populated, but I am having trouble confirming.
Ideally I would like to get to a point where I can add a card as a hash value to my db and use it for recurring billing...
That "card declined" message is actually the error you get back from Square's APIs. You can play around with the error messaging in the app.js file and the `error.jade. Try error.catagory, code, detail.
Keep in mind that this is just a sample app, to show that you can use the APIs with node.js, you probably don't want to use this code in your production system.

How to get List Of Connected Users in Google Plus via phonegap

My project requires me to get the list of connected users to the account.
I saw that i can do it using this
GET https://www.googleapis.com/plus/v1/people/me/people/connected?key={YOUR_API_KEY}
however, im having problems on how to supply YOUR_API_KEY
I tried this
https://github.com/EddyVerbruggen/cordova-plugin-googleplus
and was able to acquire the oauthtoken but it doesnt appear to be the api_key.
note : obj.idToken is always null so im only able to get the oauthtoken.
if someone could point me in the right direction that would be a great help.
Thanks,
Jay
There is some mistake in documentation. You need to use webApiKey param instead of webClientId. Look at GooglePlus.java in your Cordova plugin directory - how your JS params are put to Google Api.

Access server files with ArcGIS javascript api

I have a geoprocessing service that takes two parameters: netCDF (file) and Date (str). I'm working off of the demo found here.
The issue I have is getting the netCDF file to the geoprocessing service. By creating an upload feature I can see how I would be able to provide the needed parameter but I already have all the necessary files server side.
How can I get my web application to read local netCDF data into the geoprocessing service?
Any suggestions would be greatly appreciated.
My testing application can be found here.
Service: http://sroarcgis.ducks.org/ducksunlimited/rest/services/wsi_tool/GPServer
I receiver the error message: Error {code: 400, message: "Invalid or missing input parameters.", details: Array[0], log: undefined, httpCode: 400}
Thanks!
I'm not sure if this applies to your geoprocess, but I got this same error message and I finally fixed my problem:
Make sure you have the same fields in the search results as you have in the table the search is linked to.
It was a simple fix that took me awhile to find (as these things usually go). I had included a field that was visible in other tables, but that I had had turned off in this table before publishing the map.
Hope this helps!
After speaking with ESRI support they said that I would need to enable uploads on my web server, then upload each file individually.
Regarding your "Invalid or missing input parameters." error, you may be able to resolve this error using the following steps:
Log into ArcCatalog
Create a database connection as the user who is the owner of the table.
Select the table in the Catalog Tree.
Click the Preview tab. (Not sure if this step is really needed, but it will confirm that the metadata was refreshed properly.)
This error can crop up if the table columns change in some way. I think this process refreshes the SDE Metadata associated with the table.

Explain the Facebook access_token

This whole Facebook access_token thing is driving me nuts. All I want to do is fetch a user's public Facebook posts.
It used to work by simply doing:
$.getJSON('http://graph.facebook.com/USERNAME/posts?limit=LIMIT&callback=?', function (posts) {
// Posts available in "posts" variable
});
But now I get the "access_token required" error.
Trust me; I've checked the docs, Googled all over and checked similar questions on SO but I'm really hoping there's a more straight forward way of doing this than what I've seen.
Do you really have to create a Facebook App (I don't even have an account), make the user "accept" the app and login etc for this to work?
With Twitter it's just as easy as it used to be with Facebook.
You really have to create a Facebook App (You need to have an account), make the user "accept" the app and login etc for this to work.
However you can search public posts of user (not a specific user) by facebook's public search api.
e.g.
https://graph.facebook.com/search?q=hello&type=post
This will search all posts with hello keyword in it.
Reference ( you need to have facebook account to see this page )
http://developers.facebook.com/docs/reference/api/
Edit (after seeing comments):
If you want to access public posts of your own page. You can pull it without any login from user (but you will need an access_token)
Generate an offline access_token from here,
http://developers.facebook.com/tools/explorer.
Then you can use that token to pull data . Thus no need of logging on by user.
https://graph.facebook.com/wesellwine/posts?access_token=<access_token from graph api explorer>

Categories

Resources