• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Tyler 2 · Apr 10, 2011 at 07:51 PM · iosfacebookemailtwitter

Social features for iOS?

Hello, What would I do first if I want to have email, facebook and twitter integration (having pre-set messages/posts that the player can send from within the game) in my unity iOS game(anyone know of any good tutorials)?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Voxel-Busters · Aug 12, 2015 at 09:06 AM

There is no direct method in unity to do that. As, its native feature and Unity being cross-platform engine.

If you want to do that you need to use

  • Share sheet on iOS.

  • Intent Chooser with required types.

For this reason we developed Cross Platform Native Plugins for both iOS and Android with a unified API. It has sharing features along with other mostly used features (Notifications, Billing & many more).

Sharing feature is completely available for FREE in Lite version . Grab it and source code is included to have a look.

Sharing feature contains following functionalities

  • Share image, text,url via SMS

  • Share image, text,url via E-Mail

  • Share image, text,url via Whats-app

  • Share image, text,url on Social Network (Facebook, Twitter)

Adding to it we added separate Twitter SDK feature in full version.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Peter G · Apr 10, 2011 at 08:14 PM

Most iOS plugins are designed to work very similarly. Here is the general path.

  1. Bring the facebook/twitter plugin into xCode.

  2. You have to create a wrapper class. This isn't that hard. This class allocates an object for managing for your messaging. This just encapsulates your direct message handlers. There is a very high chance this code will be written in Objective-C.

  3. Create a collection of static methods outside your class wrapped in extern "C" {} This code will probably be in Objective-C++ (method declarations will have C syntax). This is the most flexible part of the implementation. Some how you will create an instance of your class from the previous step. Then you will call its methods [myInstance sendMessageToFeed:(Facebook*)fbPointer message:(NSString*)messageToPost]; Assuming that your class will respond to those messages.

  4. In Unity, create a plugin manager that acts as yet another wrapper. Use [DllImport("_Internal")]; to link to your plugin.

  5. Call your plugins through Unity functions and it will pass the function to unmanaged code.

The Bonjour client tutorial demonstrates the process fairly well. See Twitter and Facebook's developer documentation for their specific process of setting up your pointers and sending messages.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

social network & share function 4 Answers

Xcode hook up with Unity 1 Answer

API for posting to all social networks for all platforms 2 Answers

[iOS] Display the Activity Window to Share a Score 1 Answer

U3DXT Social FacebookPost not Working? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges