i have code on my site that adds metatags to relevant pages so that when the page is shared on facebook etc. - the correct image is scraped and used in the shared object when it is displayed on facebook. i notice that since elgg's icon handling has changed, facebook usually fails to get the right icon and i think this is possibly due to HMAC mismatch. is it possible to serve an icon in elgg that has no session data / codes / ids attached to it in any way? so that the url will always be reliable to be used by many users and thus is also suitable for distribution to social networks?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
We're using this code:
And haven't any issuses with it
from memory, that is what i am using too. are you using elgg 2.3?
ah, so i just noticed that the format of the URL for blog icons i am getting from blog_tools and the format for entities in other plugins are different because not all plugins have been updated to use the version of icon handling that was introduced in elgg 2.2. so it is only icons for plugins using the new format that have the issue. for example, this is a path for an icon of a blog on my site: https://www.ureka.org/serve-file/e0/l1444424425/di/c1/uPic9n48ZFh_viiARWmGzEnj08BfhjQCFdZBpMVEnOs/1/2/groups/158large.jpg
it is a totally different format to the standard thumbnail.php approach.
Yepp.
Try to override icons for your main entities (old format as you mentioned above), or add the hook like as:
This would be better then 'empty' image.
On other hand, I don't like ideas returns to old icon_url format..
There're some plugins which rewrites 'avatar' link: check on Ismayil and Matt github accounts (sorry, i'm in subway now and can't post the direct links...)..
Search: avatar, avatar_service repo..
thanks for the tips. i can see this one from coldtrick: https://github.com/ColdTrick/avatar_service
i think it makes more sense to fix the issue in elgg core, since this effects everyone and means that elgg pages cannot be effectively shared on social networks... at least that's what appears to be the case.
User avatars are public unless you have walled garden enabled. All other icons are tied to user session because they are access controlled. You can register your own hook and make all icons public, by using elgg_get_inline_url() without the cookie binding.
@Ismayil - are icons for entities, such as blogs, that are set to 'public' also attached to the session? it seems to me that this issue would be resolved if public icons were detached from the user session by default.
(the blog that i am using as an example is set to public and facebook appears to not be able to get its icon)
i'm interested to know if others are having the same problem as me. can someone who is running elgg 2.3 and who has og:image metatags active on their blog pages check one of their URLs in the facebook URL debugger to find out if the image is scraped correctly? https://developers.facebook.com/tools/debug/sharing/
Blogs don't have icons, so check with whatever plugin you are using. Entity's access is irrelevant, by design icons are bound to session by default, because their access can change any time and we don't want people accessing icons by static URLs.
- Previous
- 1
- 2
- 3
- Next
You must log in to post replies.