Pregunta

I added social sharing for my app via UIActivity.

How can we handle "post" event for standard providers as FB or Twitter?

enter image description here

It's easy for custom providers because we create UI for sharing manual, but for FB it's created automatically.

¿Fue útil?

Solución

Generally speaking, you cannot. The Facebook and Twitter sharing activities and the UIs they present are private subclasses of UIActivity made by Apple.

If you really wanted to, you could do some digging to figure out exactly what UIActivity subclass the Facebook or Twitter activities are using, then use method swizzling to override - (void)performActivity; and bring up your own UI. This is a terrible approach that you should not use, since it will likely break in future iOS releases in a nasty way (app crash) and almost definitely will get you kicked out of the app store. But it is a fun way to learn, if you're curious.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top