ActivityPub.Actor


#1

Hi,
I already posted this message on Mastodon meta, but I didn’t know this forum!
I am building an app called ActivityPub.Actor. The idea is to provide Activity Pub actor object for non-activitypub accounts. People are already using @[email protected] and I think that it could be usefull and cool to have @[email protected] that give the Twitter account info and link to it. We also could think of something like @[email protected] for Wikipedia people pages, and so.

But I’m facing an issue with retrieving the actor object. If, for example, you search @[email protected] in Mastodon, it do not work.
The thing is I am also coding a small CMS with activitypub integration, and I do not have any issue with it (see @[email protected]), and it’s more or less the same code. I recoded twice twitter.activitypub.actor without result. So I have no clue at all why is it not working.
And it seems to work on Pleroma (see https://pleroma.site/notice/5783507).

You can see webfinger : https://twitter.activitypub.actor/.well-known/webfinger?resource=acct:[email protected] and actor here : https://twitter.activitypub.actor/DavidLibeau/json or by doing :

wget --header="Accept: application/activity+json" https://twitter.activitypub.actor/DavidLibeau

And you can find open sources here : https://framagit.org/DavidLibeau/activitypubactor
I anyone see something, why does it not working on Mastodon, please let me know. It would be very appreciated!
Thanks :+1:


#2

I think the issue may lie in some escaping in your representation.

If you compare your webfinger representation with this one for instance, you can see that there are some backslashes escapes in yours (Inspect the source, or use curl, do not use the json viewer from your browser, if you have any): https:\/\/twitter.activitypub.actor\/DavidLibeau

Your object:

A typical mastodon representation:

It may not be the root cause, but this is probably something you’ll want to fix anyway :slight_smile:


#3

Thanks for the reply. Yeah, it is not seems to resolve the issue but it is still impoving my json! :stuck_out_tongue:


#4

Finnally resolved. My $_SERVER["HTTP_ACCEPT"] was bad tested.

Mastodon give application/activity+json, application/ld+json and Pleroma should give something like application/activity+json(that I was tested).