Open vemonet opened 3 years ago
Quickly implemented with built-in <Like>
SOLID React component
It seems to require to have created a public folder in the pod: https://vemonet.solidcommunity.net/public/activities
Uncaught (in promise) Error: Could not retrieve https://vemonet.solidcommunity.net/public/activities (404: Not Found)
Also authorize the app to edit your SOLID pod in your SOLID pod profile: https://vemonet.solidcommunity.net/profile/card
In Edit your profile > Preferences tab
Edit Manage your trusted applications to add:
https://maastrichtu-ids.github.io/shapes-of-you
with Read, Write, Access and Control authorizations
Clicking on Like
button showed this error at start:
PATCHhttps://vemonet.solidcommunity.net/public/activities
[HTTP/1.1 403 Origin Unauthorized 340ms]
@solid/react-components Error: Update query failed (403): Origin Unauthorized
next SolidUpdateEngine.js:54
processResults CreateActivityHandler.js:40
handle ActivityHandler.js:66
Now, it shows this error:
@solid/react-components Error: Update query failed (500): Internal Server Error
next SolidUpdateEngine.js:54
processResults CreateActivityHandler.js:40
handle ActivityHandler.js:66
Currently adding data to a pod fails due to permissions issue. But the user name is properly retrieved, and displayed!
To give permissions to Shapes of you to add data to your pod:
/public/activities
folder
private
(default) orpublic
Checkout the SOLID React SDK docs: https://docs.inrupt.com/developer-tools/javascript/react-sdk/
Try: https://github.com/solid/react-components (and https://github.com/solid/query-ldflex)
Replace Like by Star? https://github.com/solid/react-components#-social-interactions
Use this URI to store preferences in SOLID pod: https://maastrichtu-ids.github.io/shapes-of-you#preferences
Example to create a custom Star button:
star.tsx
:Then star it: