Image log / Image direct link

Kastello S. Posted in Beginning Developers 1 year ago

Hey,

I would like to create a discord bot which posts uploaded images (via direct link) directly into a channel so I can easily keep an eye on them.

Sadly the Image URL I get via API (photosview) or the value out of the ossn entities metadata table just return a blank page if I open them.

It's self hosted on an ubuntu server and I'm a beginner dev so please bear with me! :)

I'm open for any suggestions!

Replies
German Kastello S. Replied 1 year ago

Awesome thanks a lot!

Indonesian Arsalan Shah Replied 1 year ago

https://www.opensource-socialnetwork.org/webservices/view/3577/wall-view-post

simply pass post post_guid and if it have image it will have image argument in JSON

German Kastello S. Replied 1 year ago

Ohh that makes sense I see!
Which would be the correct one if there is any for normal post/wall pictures?
Or is there any other way to grab the public URL for them via DB?

Indonesian Arsalan Shah Replied 1 year ago

The error is correct ,

You are trying to pass a post ID to the photo_view API which is wrong photo_view is for passing the photo id that are in albums.

German Kastello S. Replied 1 year ago

Send you everything, thanks again!

Indonesian Arsalan Shah Replied 1 year ago

Please provide the actual URL of image.

If possible provide us the access you may email me at [email protected]

German Kastello S. Replied 1 year ago

Thanks for the quick response!
I updated the plugin but now I get no link at all as it says image_url = false and it only shows the internal path:

{
"merchant": "Website",
"url": "X",
"time_token": 1687866074,
"payload": {
    "album": {
        "data": {},
        "guid": 871,
        "time_created": 1687851277,
        "owner_guid": 293,
        "description": "{\"post\":\"X"}",
        "title": "",
        "type": "user",
        "subtype": "wall",
        "item_type": "",
        "item_guid": "",
        "poster_guid": "293",
        "access": "3",
        "time_updated": "0",
        "file:wallphoto": "ossnwall\/images\/923c57ecf9449374c7538968c782bcef.png",
        "sentiment": ""
    },
    "photo": {
        "guid": 7364,
        "is_liked_by_user": false,
        "total_likes": 0,
        "image_url": false,
        "time_created": 1687851277
    }
},
"code": "100",
"message": "ossnservices:success"

}

Indonesian Arsalan Shah Replied 1 year ago

The photos url appeared to be broken with API photos_view now fixed with Ossn Services 9.1 version. You can download latest version.