Apple, which has stumbled in its efforts to get into social media, has talked with Twitter in recent months about making a strategic investment in it, according to people briefed on the matter.

While Apple has been hugely successful in selling phones and tablets, it has little traction in social networking, which has become a major engine of activity on the Web and on mobile devices. Social media are increasingly influencing how people spend their time and money — an important consideration for Apple, which also sells applications, games, music and movies.

Apple has considered an investment in the hundreds of millions of dollars, one that could value Twitter at more than $10 billion, up from an $8.4 billion valuation last year, these people said. They declined to be named because the discussions were private.

There is no guarantee that the two companies, which are not in negotiations at the moment, will come to an agreement. But the earlier talks are a sign that they may form a stronger partnership amid intensifying competition from the likes of Google and Facebook.