either via the session or via the API parameter for specifying the user [duplicate] - facebook

This question already has an answer here:
"Requires a valid user is specified ..." error when using getCount
(1 answer)
Closed 5 years ago.
I would like to share with another friend's wall. but get the following error
Fatal error: Uncaught Exception: 240: Requires a valid user is specified (either via the session or via the API parameter for specifying the user.

Next time you should search Google before asking a question.
The answer to the this duplicate question will give you the answer for this question.
You can find the Test Console for REST API user.setstatus here for assistance.

Related

Firebase Authentication Account Not Showing in Console Despite Successful Creation [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
I have a Flutter code that creates a new account using the Firebase Authentication library. However, even though the account is created successfully and I can even log in to it using another code, the account does not appear in the Firebase Authentication console. I have tried checking if I am connected to the correct Firebase project, looking for the account in the console, accessing the account again using the Firebase Authentication library, and making sure that the data I provided during the account creation process is correct. Despite all these attempts, the account does not show up in the console. How can I resolve this issue?
Checking that I am connected to the correct Firebase project.
Looking for the account in the Firebase Authentication console.
Accessing the account again using the Firebase Authentication library.
Verifying that the data I provided during the account creation process is correct.
Despite trying these steps, the account I created using Flutter and Firebase Authentication does not show up in the console.

Write Rules Firebase Cloud for URL parameters [duplicate]

This question already has answers here:
Firestore Security Rules: Passing a request parameter in a get() call?
(1 answer)
Can I send value with request to Firestore rules
(2 answers)
Closed 3 months ago.
I have a URL like: https://myweb.com/customer/order?resId={resId}&tableId={tableId}
i research a lot but kind of like my issue was not anyone refuse yet: https://firebase.google.com/docs/rules/get-started
and I want to access this URL to allow read, and write without auth because I tend to use this route for Customers who scan QR and direct to my website
and my Firebase Cloud have tree collection like restaurant (auto-generate-ID) > table(auto-generate-ID)
What can I do to handle, please help me

Storing a uid in anonymous posts a bad idea? [duplicate]

This question already has answers here:
Firebase Database - Risks associated with exposing uid on the client side?
(1 answer)
Is auth.uid a shared secret?
(2 answers)
Closed 2 years ago.
I'm designing a Firestore database for a Facebook-like, social media app and giving the users the option of posting publicly (name included) or anonymously. I had planned on putting all the posts in a top-level collection and using a uid field so users could retrieve and edit their own posts. However, it occurs to be that these uids would be pulled down when users read anonymous posts, so vulnerable to hacking? (e.g., finding non-anonymous posts with the same uids and exposing the user.)
So, now I'm thinking I'll keep the posts as subcollections of the user so that a uid isn't required.
Is my security concern valid? If so, is subcollections the better/best approach?
EDIT: My question is not a duplicate of this question or this question because it's asking about keeping user's anonymity, not editing their data.
Your point is right - the user ids could be exposed via initial method. There are several methods to approach this based on your solution.
All posts in users/{uid}/posts/{pid}
I wouldn't rate it the best method as it would require you to query all subcollections of user/post to show a "news feed".
Keeping the current structure & setting userid to anon
You can keep the current structure & set user id to anon in the document. This wouldn't let the OP edit his own anonymous post. To fix that, we can have another subcollection in users/{uid}/posts/{pid}. That would contain a "link" to posts/{pid}
This method is a combination of both of your methods.

Access to XMLHttpRequest blocked by CORS policy [duplicate]

This question already has answers here:
Why doesn't adding CORS headers to an OPTIONS route allow browsers to access my API?
(36 answers)
How does the 'Access-Control-Allow-Origin' header work?
(19 answers)
Closed 4 years ago.
I am deploying my first app on heroku. (It's a node.js/react app.) The app has deployed successfully, but when I try to login I get this error:
Access to XMLHttpRequest at 'https://<myApp>.herokuapp.com/users' from origin
'https://<myApp>-front-end.herokuapp.com' has been blocked by CORS policy:
Response to preflight request doesn't pass access control check: No 'Access-
Control-Allow-Origin' header is present on the requested resource.
I know other answers explain how to fix this problem with a proxy url, but I am wondering whether I did something wrong in the first place. Following an online tutorial, I deployed the front end and back end separately, and that seems to be causing the problem. Should I have deployed the front end and back end together to avoid this problem? Or is getting around this problem a normal part of deploying an app?

Uber Driver API invalid scope error when partner.trips parameter added, do not see it available on developer dashboard

My question is how I can access the driver's history using the Uber's API? What I have tried is including the partners.trips scope and tried multiple variations such as scope=partners.trips, partners.trips.content, trips. All have given me an invalid scope error when I try to authenticate.
I have noticed that I do not see partners.trips as an available option in my developer dashboard page (screenshot of dev dashboard). As of now, I see 2 possible problems that I could be having, but I could not find a solution from the documentation or FAQ.
My formatting or syntax is incorrect when I add scope=partners.trips to my authorization step
I don't have access to add partners.trips in my default scope and don't have a way to request it from Uber
"Access to the Driver API is currently limited. If you are interested in using this API, you can apply for access on the Drivers Product Page." - https://developer.uber.com/docs/drivers/introduction